DiscoveryClientProtocol.ReadAll メソッド
アセンブリ: System.Web.Services (system.web.services.dll 内)

Dim instance As DiscoveryClientProtocol Dim topLevelFilename As String Dim returnValue As DiscoveryClientResultCollection returnValue = instance.ReadAll(topLevelFilename)
戻り値
保存されている探索ドキュメントのマップを格納しているファイルで見つかった結果が格納されている DiscoveryClientResultCollection。ファイル形式は DiscoveryClientProtocol.DiscoveryClientResultsFile クラスで XML にシリアル化されています。ただし、通常は WriteAll メソッドまたは Disco.exe だけを使用してファイルを作成します。


ReadAll メソッドを使用して既存のディスカバリ マップ ドキュメント内に見つかったドキュメントと参照に関する詳細を DataGrid に読み込む Web フォームのコード例を次に示します。
Public Sub Discover_Click(Source As Object, e as EventArgs ) ' Specify the URL to read the discovery results from. Dim outputDirectory As String = DiscoDir.Text Dim client as DiscoveryClientProtocol = new DiscoveryClientProtocol() ' Use default credentials to access files containing the previously saved discovery results. client.Credentials = CredentialCache.DefaultCredentials Try Dim doc As DiscoveryDocument ' Read in existing discovery results. Dim results As DiscoveryClientResultCollection results = client.ReadAll(Path.Combine(DiscoDir.Text,"results.discomap")) Catch e2 As Exception DiscoveryResultsGrid.Columns.Clear() Status.Text = e2.Message End Try ' If disocvery documents existed in the supplied folder, display the results in a data grid. If (client.Documents.Count > 0) Then ' Populate the data grid with the discovery results. PopulateGrid(client) End If End Sub
protected void Discover_Click(object Source, EventArgs e) { // Specify the URL to read the discovery results from. string outputDirectory = DiscoDir.Text; DiscoveryClientProtocol client = new DiscoveryClientProtocol(); // Use default credentials to access the files containing the discovery results. client.Credentials = CredentialCache.DefaultCredentials; try { DiscoveryDocument doc; // Read in existing discovery results. DiscoveryClientResultCollection results = client.ReadAll(Path.Combine(DiscoDir.Text ,"results.discomap")); } catch ( Exception e2) { DiscoveryResultsGrid.Columns.Clear(); Status.Text = e2.Message; } // If discovery documents existed in the supplied folder, display the results in a data grid. if (client.Documents.Count > 0) PopulateGrid(client); }

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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からDiscoveryClientProtocol.ReadAll メソッドを検索する場合は、下記のリンクをクリックしてください。

- DiscoveryClientProtocol.ReadAll メソッドのページへのリンク