DiscoveryClientDocumentCollection Sınıf

Tanım

İstemciye indirilen XML Web hizmetleri bulma sırasında bulunan belge koleksiyonunu temsil eder. Bu sınıf devralınamaz.

public ref class DiscoveryClientDocumentCollection sealed : System::Collections::DictionaryBase
public sealed class DiscoveryClientDocumentCollection : System.Collections.DictionaryBase
type DiscoveryClientDocumentCollection = class
    inherit DictionaryBase
Public NotInheritable Class DiscoveryClientDocumentCollection
Inherits DictionaryBase
Devralma
DiscoveryClientDocumentCollection

Örnekler

Aşağıdaki kod örneği XML Web hizmeti bulma işlemini yapar ve bulunan belgeleri istemciye indirir. içindeki DiscoveryClientDocumentCollection bulma belgelerinin adları konsolunun çıkışıdır.

#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 ] );

   }
}
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]);
      }
   }
}
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

   <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
End Class

Açıklamalar

Documents özelliği DiscoveryClientProtocol türündedirDiscoveryClientDocumentCollection.

Oluşturucular

DiscoveryClientDocumentCollection()

DiscoveryClientDocumentCollection sınıfının yeni bir örneğini başlatır.

Özellikler

Count

Örnekte bulunan DictionaryBase öğelerin sayısını alır.

(Devralındığı yer: DictionaryBase)
Dictionary

Örnekte bulunan DictionaryBase öğelerin listesini alır.

(Devralındığı yer: DictionaryBase)
InnerHashtable

Örnekte bulunan DictionaryBase öğelerin listesini alır.

(Devralındığı yer: DictionaryBase)
Item[String]

belirtilen URL'ye sahip istemci bulma belgesi nesnesini DiscoveryClientDocumentCollection alır veya ayarlar.

Keys

içindeki DiscoveryClientDocumentCollectiontüm anahtarlara sahip bir ICollection nesne alır.

Values

içindeki DiscoveryClientDocumentCollectiontüm değerleri içeren bir ICollection nesnesi alır.

Yöntemler

Add(String, Object)

öğesine belirtilen URL'ye DiscoveryClientDocumentCollectionsahip bir nesne ekler.

Clear()

Örneğin içeriğini DictionaryBase temizler.

(Devralındığı yer: DictionaryBase)
Contains(String)

öğesinin belirtilen URL'ye DiscoveryClientDocumentCollection sahip bir nesne içerip içermediğini belirler.

CopyTo(Array, Int32)

DictionaryBase Öğeleri belirtilen dizindeki tek boyutlu Array bir dizine kopyalar.

(Devralındığı yer: DictionaryBase)
Equals(Object)

Belirtilen nesnenin geçerli nesneye eşit olup olmadığını belirler.

(Devralındığı yer: Object)
GetEnumerator()

Örnekte yineleyen DictionaryBase bir IDictionaryEnumerator döndürür.

(Devralındığı yer: DictionaryBase)
GetHashCode()

Varsayılan karma işlevi işlevi görür.

(Devralındığı yer: Object)
GetType()

Type Geçerli örneğini alır.

(Devralındığı yer: Object)
MemberwiseClone()

Geçerli Objectöğesinin sığ bir kopyasını oluşturur.

(Devralındığı yer: Object)
OnClear()

Örneğin içeriğini DictionaryBase temizlemeden önce ek özel işlemler gerçekleştirir.

(Devralındığı yer: DictionaryBase)
OnClearComplete()

Örneğin içeriğini DictionaryBase temizledikten sonra ek özel işlemler gerçekleştirir.

(Devralındığı yer: DictionaryBase)
OnGet(Object, Object)

örnekte belirtilen anahtar ve değere DictionaryBase sahip öğesini alır.

(Devralındığı yer: DictionaryBase)
OnInsert(Object, Object)

Örneğe yeni bir öğe DictionaryBase eklemeden önce ek özel işlemler gerçekleştirir.

(Devralındığı yer: DictionaryBase)
OnInsertComplete(Object, Object)

Örneğe yeni bir öğe DictionaryBase ekledikten sonra ek özel işlemler gerçekleştirir.

(Devralındığı yer: DictionaryBase)
OnRemove(Object, Object)

Bir öğeyi örnekten DictionaryBase kaldırmadan önce ek özel işlemler gerçekleştirir.

(Devralındığı yer: DictionaryBase)
OnRemoveComplete(Object, Object)

Örnekten DictionaryBase bir öğeyi kaldırdıktan sonra ek özel işlemler gerçekleştirir.

(Devralındığı yer: DictionaryBase)
OnSet(Object, Object, Object)

Örnekte bir değer DictionaryBase ayarlamadan önce ek özel işlemler gerçekleştirir.

(Devralındığı yer: DictionaryBase)
OnSetComplete(Object, Object, Object)

Örnekte bir değer DictionaryBase ayarladıktan sonra ek özel işlemler gerçekleştirir.

(Devralındığı yer: DictionaryBase)
OnValidate(Object, Object)

Öğesi belirtilen anahtar ve değerle doğrulanırken ek özel işlemler gerçekleştirir.

(Devralındığı yer: DictionaryBase)
Remove(String)

belirtilen URL'ye sahip bir nesneyi öğesinden DiscoveryClientDocumentCollectionkaldırır.

ToString()

Geçerli nesneyi temsil eden dizeyi döndürür.

(Devralındığı yer: Object)

Belirtik Arabirim Kullanımları

ICollection.IsSynchronized

Bir nesneye erişimin eşitlenip eşitlenmediğini belirten bir DictionaryBase değer alır (iş parçacığı güvenli).

(Devralındığı yer: DictionaryBase)
ICollection.SyncRoot

Bir nesneye erişimi eşitlemek için kullanılabilecek bir DictionaryBase nesne alır.

(Devralındığı yer: DictionaryBase)
IDictionary.Add(Object, Object)

öğesine belirtilen anahtar ve değere DictionaryBasesahip bir öğe ekler.

(Devralındığı yer: DictionaryBase)
IDictionary.Contains(Object)

öğesinin DictionaryBase belirli bir anahtar içerip içermediğini belirler.

(Devralındığı yer: DictionaryBase)
IDictionary.IsFixedSize

Bir nesnenin sabit bir boyuta sahip olup olmadığını belirten bir DictionaryBase değer alır.

(Devralındığı yer: DictionaryBase)
IDictionary.IsReadOnly

Bir nesnenin salt okunur olup olmadığını belirten bir DictionaryBase değer alır.

(Devralındığı yer: DictionaryBase)
IDictionary.Item[Object]

Belirtilen anahtarla ilişkili değeri alır veya ayarlar.

(Devralındığı yer: DictionaryBase)
IDictionary.Keys

Nesnedeki DictionaryBase anahtarları içeren bir ICollection nesneyi alır.

(Devralındığı yer: DictionaryBase)
IDictionary.Remove(Object)

öğesinden DictionaryBasebelirtilen anahtara sahip öğesini kaldırır.

(Devralındığı yer: DictionaryBase)
IDictionary.Values

Nesnedeki DictionaryBase değerleri içeren bir ICollection nesneyi alır.

(Devralındığı yer: DictionaryBase)
IEnumerable.GetEnumerator()

aracılığıyla DictionaryBaseyineleyen bir IEnumerator döndürür.

(Devralındığı yer: DictionaryBase)

Uzantı Metotları

Cast<TResult>(IEnumerable)

öğesinin IEnumerable öğelerini belirtilen türe atar.

OfType<TResult>(IEnumerable)

Bir öğesinin IEnumerable öğelerini belirtilen türe göre filtreler.

AsParallel(IEnumerable)

Sorgunun paralelleştirilmesini sağlar.

AsQueryable(IEnumerable)

bir IEnumerable öğesini öğesine IQueryabledönüştürür.

Şunlara uygulanır

Ayrıca bkz.