DiscoveryClientDocumentCollection クラスとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > DiscoveryClientDocumentCollection クラスの意味・解説 

DiscoveryClientDocumentCollection クラス

XML Web サービス探索中に取得されクライアントダウンロードされたドキュメントコレクション表します。このクラス継承できません。

名前空間: System.Web.Services.Discovery
アセンブリ: System.Web.Services (system.web.services.dll 内)
構文構文

Public NotInheritable Class
 DiscoveryClientDocumentCollection
    Inherits DictionaryBase
Dim instance As DiscoveryClientDocumentCollection
public sealed class DiscoveryClientDocumentCollection
 : DictionaryBase
public ref class DiscoveryClientDocumentCollection
 sealed : public DictionaryBase
public final class DiscoveryClientDocumentCollection
 extends DictionaryBase
public final class DiscoveryClientDocumentCollection
 extends DictionaryBase
解説解説

DiscoveryClientProtocol の Documents プロパティDiscoveryClientDocumentCollection 型です。

使用例使用例

XML Web サービス探索実行して取得したドキュメントクライアントダウンロードするコード例次に示しますDiscoveryClientDocumentCollection 内の探索ドキュメントの名前がコンソール出力されます。

Imports System
Imports System.Net
Imports System.IO
Imports System.Collections
Imports System.Security.Permissions
Imports System.Web.Services.Discovery

Class DiscoveryClientDocumentCollectionSample
   
   Shared Sub Main()
      Run()
   End Sub 'Main

   <PermissionSetAttribute(SecurityAction.Demand, Name := "FullTrust")>
 _
   Shared Sub Run()

      Dim myDiscoveryClientProtocol As New
 DiscoveryClientProtocol()
      
      myDiscoveryClientProtocol.Credentials = CredentialCache.DefaultCredentials
      
      ' 'dataservice.disco' is a sample discovery document.
      Dim myStringUrl As String
 = "http://localhost/dataservice.disco"
      
      ' 'Discover' method is called to populate the 'Documents' property.
      Dim myDiscoveryDocument As DiscoveryDocument
 = myDiscoveryClientProtocol.Discover(myStringUrl)
      
      ' An instance of the 'DiscoveryClientDocumentCollection' class
 is created.
      Dim myDiscoveryClientDocumentCollection As
 DiscoveryClientDocumentCollection = _
                                                myDiscoveryClientProtocol.Documents
      
      ' 'Keys' in the collection are retrieved.
      Dim myCollection As ICollection = myDiscoveryClientDocumentCollection.Keys
      Dim myObjectCollection(myDiscoveryClientDocumentCollection.Count-1)
 As Object
      myCollection.CopyTo(myObjectCollection, 0)
      
      Console.WriteLine("The discovery documents in the collection
 are :")
      Dim iIndex As Integer
      For iIndex = 0 To myObjectCollection.Length
 - 1
         Console.WriteLine(myObjectCollection(iIndex))
      Next iIndex
      
      Console.WriteLine("")
      
      ' 'Values' in the collection are retrieved.
      Dim myCollection1 As ICollection = myDiscoveryClientDocumentCollection.Values
      Dim myObjectCollection1(myDiscoveryClientDocumentCollection.Count-1)
 As Object
      myCollection1.CopyTo(myObjectCollection1, 0)
      
      Console.WriteLine("The objects in the collection are :")
      For iIndex = 0 To myObjectCollection1.Length
 - 1
         Console.WriteLine(myObjectCollection1(iIndex))
      Next iIndex
   End Sub 'Run
End Class 'DiscoveryClientDocumentCollectionSample
using System;
using System.Net;
using System.IO;
using System.Collections;
using System.Security.Permissions;
using System.Web.Services.Discovery;

class DiscoveryClientDocumentCollectionSample
{
   static void Main()
   {
      Run();
   }

   [PermissionSetAttribute(SecurityAction.Demand, Name="FullTrust")]
   static void Run()
   {
      DiscoveryClientProtocol myDiscoveryClientProtocol =
         new DiscoveryClientProtocol();
      
      myDiscoveryClientProtocol.Credentials = CredentialCache.DefaultCredentials;

      // 'dataservice.disco' is a sample discovery document.
      string myStringUrl = "http://localhost/dataservice.disco";
      
      // 'Discover' method is called to populate the 'Documents' property.
      DiscoveryDocument myDiscoveryDocument = 
         myDiscoveryClientProtocol.Discover(myStringUrl);

      // An instance of the 'DiscoveryClientDocumentCollection' class
 is created.
      DiscoveryClientDocumentCollection myDiscoveryClientDocumentCollection = 
         myDiscoveryClientProtocol.Documents;
      
      // 'Keys' in the collection are retrieved.
      ICollection myCollection = myDiscoveryClientDocumentCollection.Keys;
      object[] myObjectCollection = 
         new object[myDiscoveryClientDocumentCollection.Count];
      myCollection.CopyTo(myObjectCollection, 0);
      
      Console.WriteLine("The discovery documents in the collection
 are :");
      for (int iIndex=0; iIndex < myObjectCollection.Length;
 iIndex++)
      {
         Console.WriteLine(myObjectCollection[iIndex]);
      }
      
      Console.WriteLine("");

      // 'Values' in the collection are retrieved.
      ICollection myCollection1 = myDiscoveryClientDocumentCollection.Values;
      object[] myObjectCollection1 = 
         new object[myDiscoveryClientDocumentCollection.Count];
      myCollection1.CopyTo(myObjectCollection1, 0);
      
      Console.WriteLine("The objects in the collection are
 :");
      for (int iIndex=0; iIndex < myObjectCollection1.Length;
 iIndex++)
      {
         Console.WriteLine(myObjectCollection1[iIndex]);
      }
   }
} 
#using <System.dll>
#using <System.Web.Services.dll>

using namespace System;
using namespace System::Net;
using namespace System::IO;
using namespace System::Collections;
using namespace System::Web::Services::Discovery;

int main()
{
   DiscoveryClientProtocol^ myDiscoveryClientProtocol = gcnew DiscoveryClientProtocol;
   myDiscoveryClientProtocol->Credentials = CredentialCache::DefaultCredentials;
   
   // 'dataservice.disco' is a sample discovery document.
   String^ myStringUrl = "http://localhost/dataservice.disco";
   
   // 'Discover' method is called to populate the 'Documents' property.
   DiscoveryDocument^ myDiscoveryDocument =
      myDiscoveryClientProtocol->Discover( myStringUrl );
   
   // An instance of the 'DiscoveryClientDocumentCollection' class is
 created.
   DiscoveryClientDocumentCollection^ myDiscoveryClientDocumentCollection =
      myDiscoveryClientProtocol->Documents;
   
   // 'Keys' in the collection are retrieved.
   ICollection^ myCollection = myDiscoveryClientDocumentCollection->Keys;
   array<Object^>^myObjectCollection =
      gcnew array<Object^>(myDiscoveryClientDocumentCollection->Count);
   myCollection->CopyTo( myObjectCollection, 0 );
   Console::WriteLine( "The discovery documents in the collection
 are :" );
   for ( int iIndex = 0; iIndex < myObjectCollection->Length;
 iIndex++ )
   {
      Console::WriteLine( myObjectCollection[ iIndex ] );

   }
   Console::WriteLine( "" );
   
   // 'Values' in the collection are retrieved.
   ICollection^ myCollection1 = myDiscoveryClientDocumentCollection->Values;
   array<Object^>^myObjectCollection1 =
      gcnew array<Object^>(myDiscoveryClientDocumentCollection->Count);
   myCollection1->CopyTo( myObjectCollection1, 0 );
   Console::WriteLine( "The objects in the collection are
 :" );
   for ( int iIndex = 0; iIndex < myObjectCollection1->Length;
 iIndex++ )
   {
      Console::WriteLine( myObjectCollection1[ iIndex ] );

   }
}
継承階層継承階層
System.Object
   System.Collections.DictionaryBase
    System.Web.Services.Discovery.DiscoveryClientDocumentCollection
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
DiscoveryClientDocumentCollection メンバ
System.Web.Services.Discovery 名前空間
IDictionary
DictionaryBase



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「DiscoveryClientDocumentCollection クラス」の関連用語

DiscoveryClientDocumentCollection クラスのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



DiscoveryClientDocumentCollection クラスのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2024 Microsoft.All rights reserved.

©2024 GRAS Group, Inc.RSS