DiscoveryClientResultCollection Sınıf

Tanım

Bir nesne koleksiyonu DiscoveryClientResult içerir. Bu sınıf devralınamaz.

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

Örnekler

#using <System.Xml.dll>
#using <System.Web.Services.dll>
#using <System.dll>

using namespace System;
using namespace System::Reflection;
using namespace System::IO;
using namespace System::Web::Services::Discovery;
using namespace System::Xml::Schema;
using namespace System::Collections;

int main()
{
   try
   {
      DiscoveryClientProtocol^ myDiscoveryClientProtocol = gcnew DiscoveryClientProtocol;
      
      // Get the collection of DiscoveryClientResult objects.
      DiscoveryClientResultCollection^ myDiscoveryClientResultCollection =
         myDiscoveryClientProtocol->ReadAll( "results.discomap" );
      Console::WriteLine( "Removing a DiscoveryClientResult from the collection..." );
      
      // Remove the first DiscoveryClientResult from the collection.
      myDiscoveryClientResultCollection->Remove( myDiscoveryClientResultCollection[ 0 ] );
      Console::WriteLine( "Adding a DiscoveryClientResult to the collection..." );
      DiscoveryClientResult^ myDiscoveryClientResult = gcnew DiscoveryClientResult;
      
      // Set the DiscoveryDocumentReference class as the type of 
      // reference in the discovery document.
      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 myDiscoveryClientResult to the collection.
      myDiscoveryClientResultCollection->Add( myDiscoveryClientResult );
      if ( myDiscoveryClientResultCollection->Contains( myDiscoveryClientResult ) )
      {
         Console::WriteLine( "Instance of DiscoveryClientResult found in the Collection" );
      }
   }
   catch ( Exception^ ex ) 
   {
      Console::WriteLine( "Error is {0}", ex->Message );
   }
}
using System;
using System.Reflection;
using System.IO;
using System.Web.Services.Discovery;
using System.Xml.Schema;
using System.Collections;

public class MyDiscoveryClientResult
{
   static void Main()
   {
      try
      {
         DiscoveryClientProtocol myDiscoveryClientProtocol =
             new DiscoveryClientProtocol();

         // Get the collection of DiscoveryClientResult objects.
         DiscoveryClientResultCollection myDiscoveryClientResultCollection =
             myDiscoveryClientProtocol.ReadAll("results.discomap");
         Console.WriteLine(
             "Removing a DiscoveryClientResult from the collection...");

         // Remove the first DiscoveryClientResult from the collection.
         myDiscoveryClientResultCollection.Remove(
             myDiscoveryClientResultCollection[0]);
         Console.WriteLine("Adding a DiscoveryClientResult" +
             " to the collection...");
         DiscoveryClientResult myDiscoveryClientResult =
             new DiscoveryClientResult();

         // Set the DiscoveryDocumentReference class as the type of
         // reference in the discovery document.
         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 myDiscoveryClientResult to the collection.
         myDiscoveryClientResultCollection.Add(myDiscoveryClientResult);
         if(myDiscoveryClientResultCollection.Contains(myDiscoveryClientResult))
         {
            Console.WriteLine(
                "Instance of DiscoveryClientResult found in the Collection");
         }
      }
      catch(Exception ex)
      {
         Console.WriteLine("Error is "+ex.Message);
      }
   }
}
Imports System.Reflection
Imports System.IO
Imports System.Web.Services.Discovery
Imports System.Xml.Schema
Imports System.Collections

Public Class MyDiscoveryClientResult
   
   Shared Sub Main()
      Try
         Dim myDiscoveryClientProtocol As New DiscoveryClientProtocol()

         ' Get the collection of DiscoveryClientResult objects.
         Dim myDiscoveryClientResultCollection As _
             DiscoveryClientResultCollection = _
             myDiscoveryClientProtocol.ReadAll("results.discomap")
         Console.WriteLine( _
             "Removing a DiscoveryClientResult from the collection...")

         ' Remove the first DiscoveryClientResult from the collection.
         myDiscoveryClientResultCollection.Remove( _
             myDiscoveryClientResultCollection(0))
         Console.WriteLine("Adding a DiscoveryClientResult" & _
             " to the collection...")
         Dim myDiscoveryClientResult As New DiscoveryClientResult()

         ' Set the DiscoveryDocumentReference class as the type of 
         ' reference in the discovery document.
         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 myDiscoveryClientResult to the collection.
         myDiscoveryClientResultCollection.Add(myDiscoveryClientResult)

         If myDiscoveryClientResultCollection.Contains( _ 
             myDiscoveryClientResult) Then

             Console.WriteLine( _
                 "Instance of DiscoveryClientResult found in the Collection")
         End If

      Catch ex As Exception
         Console.WriteLine("Error is " + ex.Message)
      End Try
   End Sub
End Class

Oluşturucular

DiscoveryClientResultCollection()

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

Özellikler

Capacity

öğesinin içerebileceği öğe CollectionBase sayısını alır veya ayarlar.

(Devralındığı yer: CollectionBase)
Count

Örnekte bulunan CollectionBase öğelerin sayısını alır. Bu özellik geçersiz kılınamaz.

(Devralındığı yer: CollectionBase)
InnerList

Örnekteki öğelerin CollectionBase listesini içeren bir ArrayList alır.

(Devralındığı yer: CollectionBase)
Item[Int32]

konumunda i DiscoveryClientResultCollectionöğesini DiscoveryClientResult alır veya ayarlar.

List

Örnekteki öğelerin CollectionBase listesini içeren bir IList alır.

(Devralındığı yer: CollectionBase)

Yöntemler

Add(DiscoveryClientResult)

öğesine DiscoveryClientResultCollectionbir DiscoveryClientResult ekler.

Clear()

Örnekteki CollectionBase tüm nesneleri kaldırır. Bu yöntem geçersiz kılınamaz.

(Devralındığı yer: CollectionBase)
Contains(DiscoveryClientResult)

öğesinin DiscoveryClientResultCollection belirli DiscoveryClientResultbir öğesini içerip içermediğini belirler.

Equals(Object)

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

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

Örnekte yineleyen CollectionBase bir numaralandırıcı döndürür.

(Devralındığı yer: CollectionBase)
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 CollectionBase temizlerken ek özel işlemler gerçekleştirir.

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

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

(Devralındığı yer: CollectionBase)
OnInsert(Int32, Object)

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

(Devralındığı yer: CollectionBase)
OnInsertComplete(Int32, Object)

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

(Devralındığı yer: CollectionBase)
OnRemove(Int32, Object)

Bir öğeyi örnekten CollectionBase kaldırırken ek özel işlemler gerçekleştirir.

(Devralındığı yer: CollectionBase)
OnRemoveComplete(Int32, Object)

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

(Devralındığı yer: CollectionBase)
OnSet(Int32, Object, Object)

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

(Devralındığı yer: CollectionBase)
OnSetComplete(Int32, Object, Object)

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

(Devralındığı yer: CollectionBase)
OnValidate(Object)

Bir değeri doğrularken ek özel işlemler gerçekleştirir.

(Devralındığı yer: CollectionBase)
Remove(DiscoveryClientResult)

Belirli DiscoveryClientResult bir öğesinin ilk oluşumunu içinden DiscoveryClientResultCollectionkaldırır.

RemoveAt(Int32)

Örneğin belirtilen dizinindeki CollectionBase öğesini kaldırır. Bu yöntem geçersiz kılınamaz.

(Devralındığı yer: CollectionBase)
ToString()

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

(Devralındığı yer: Object)

Belirtik Arabirim Kullanımları

ICollection.CopyTo(Array, Int32)

Hedef dizinin belirtilen dizininden başlayarak tamamını CollectionBase uyumlu bir tek boyutlu Arrayöğesine kopyalar.

(Devralındığı yer: CollectionBase)
ICollection.IsSynchronized

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

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

erişimi CollectionBaseeşitlemek için kullanılabilecek bir nesnesi alır.

(Devralındığı yer: CollectionBase)
IList.Add(Object)

sonuna bir nesnesi CollectionBaseekler.

(Devralındığı yer: CollectionBase)
IList.Contains(Object)

öğesinin CollectionBase belirli bir öğeyi içerip içermediğini belirler.

(Devralındığı yer: CollectionBase)
IList.IndexOf(Object)

Belirtilen Object öğesini arar ve tüm CollectionBaseiçindeki ilk oluşumun sıfır tabanlı dizinini döndürür.

(Devralındığı yer: CollectionBase)
IList.Insert(Int32, Object)

Belirtilen dizinde öğesine CollectionBase bir öğe ekler.

(Devralındığı yer: CollectionBase)
IList.IsFixedSize

değerinin sabit bir boyuta sahip olup olmadığını CollectionBase belirten bir değer alır.

(Devralındığı yer: CollectionBase)
IList.IsReadOnly

CollectionBase öğesinin salt okunur olup olmadığını belirten bir değer alır.

(Devralındığı yer: CollectionBase)
IList.Item[Int32]

Belirtilen dizindeki öğeyi alır veya ayarlar.

(Devralındığı yer: CollectionBase)
IList.Remove(Object)

Belirli bir nesnenin ilk oluşumunu öğesinden CollectionBasekaldırır.

(Devralındığı yer: CollectionBase)

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.