DiscoveryClientResultCollection Klasse

Definition

Enthält eine Auflistung von DiscoveryClientResult-Objekten. Diese Klasse kann nicht vererbt werden.

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
Vererbung
DiscoveryClientResultCollection

Beispiele

#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

Konstruktoren

DiscoveryClientResultCollection()

Initialisiert eine neue Instanz der DiscoveryClientResultCollection-Klasse.

Eigenschaften

Capacity

Ruft die Anzahl der Elemente ab, die die CollectionBase enthalten kann, oder legt diese fest.

(Geerbt von CollectionBase)
Count

Ruft die Anzahl der in der CollectionBase-Instanz enthaltenen Elemente ab. Diese Eigenschaft kann nicht überschrieben werden.

(Geerbt von CollectionBase)
InnerList

Ruft eine ArrayList mit der Liste der Elemente in der CollectionBase-Instanz ab.

(Geerbt von CollectionBase)
Item[Int32]

Ruft das DiscoveryClientResult an der Position i der DiscoveryClientResultCollection ab oder legt dieses fest.

List

Ruft eine IList mit der Liste der Elemente in der CollectionBase-Instanz ab.

(Geerbt von CollectionBase)

Methoden

Add(DiscoveryClientResult)

Fügt der DiscoveryClientResult einen DiscoveryClientResultCollection hinzu.

Clear()

Entfernt alle Objekte aus der CollectionBase-Instanz. Diese Methode kann nicht überschrieben werden.

(Geerbt von CollectionBase)
Contains(DiscoveryClientResult)

Ermittelt, ob die DiscoveryClientResultCollection einen bestimmten DiscoveryClientResult enthält.

Equals(Object)

Bestimmt, ob das angegebene Objekt gleich dem aktuellen Objekt ist.

(Geerbt von Object)
GetEnumerator()

Gibt einen Enumerator zurück, der die CollectionBase durchläuft.

(Geerbt von CollectionBase)
GetHashCode()

Fungiert als Standardhashfunktion.

(Geerbt von Object)
GetType()

Ruft den Type der aktuellen Instanz ab.

(Geerbt von Object)
MemberwiseClone()

Erstellt eine flache Kopie des aktuellen Object.

(Geerbt von Object)
OnClear()

Führt beim Löschen des Inhalts der CollectionBase-Instanz zusätzliche benutzerdefinierte Prozesse aus.

(Geerbt von CollectionBase)
OnClearComplete()

Führt nach dem Löschen des Inhalts der CollectionBase-Instanz zusätzliche benutzerdefinierte Prozesse aus.

(Geerbt von CollectionBase)
OnInsert(Int32, Object)

Führt zusätzliche benutzerdefinierte Prozesse vor dem Einfügen eines neuen Elements in die CollectionBase-Instanz aus.

(Geerbt von CollectionBase)
OnInsertComplete(Int32, Object)

Führt zusätzliche benutzerdefinierte Prozesse nach dem Einfügen eines neuen Elements in die CollectionBase-Instanz aus.

(Geerbt von CollectionBase)
OnRemove(Int32, Object)

Führt zusätzliche benutzerdefinierte Prozesse beim Entfernen eines Elements aus der CollectionBase-Instanz aus.

(Geerbt von CollectionBase)
OnRemoveComplete(Int32, Object)

Führt zusätzliche benutzerdefinierte Prozesse nach dem Entfernen eines Elements aus der CollectionBase-Instanz aus.

(Geerbt von CollectionBase)
OnSet(Int32, Object, Object)

Führt zusätzliche benutzerdefinierte Prozesse vor dem Festlegen eines Werts in der CollectionBase-Instanz aus.

(Geerbt von CollectionBase)
OnSetComplete(Int32, Object, Object)

Führt zusätzliche benutzerdefinierte Prozesse nach dem Festlegen eines Werts in der CollectionBase-Instanz aus.

(Geerbt von CollectionBase)
OnValidate(Object)

Führt zusätzliche benutzerdefinierte Prozesse beim Validieren eines Werts aus.

(Geerbt von CollectionBase)
Remove(DiscoveryClientResult)

Entfernt das erste Vorkommen einer bestimmten DiscoveryClientResult aus DiscoveryClientResultCollection.

RemoveAt(Int32)

Entfernt das Element am angegebenen Index aus der CollectionBase-Instanz. Diese Methode kann nicht überschrieben werden.

(Geerbt von CollectionBase)
ToString()

Gibt eine Zeichenfolge zurück, die das aktuelle Objekt darstellt.

(Geerbt von Object)

Explizite Schnittstellenimplementierungen

ICollection.CopyTo(Array, Int32)

Kopiert die gesamte CollectionBase-Instanz in ein kompatibles eindimensionales Array, beginnend am angegebenen Index des Zielarrays.

(Geerbt von CollectionBase)
ICollection.IsSynchronized

Ruft einen Wert ab, der angibt, ob der Zugriff auf die CollectionBase synchronisiert (threadsicher) ist.

(Geerbt von CollectionBase)
ICollection.SyncRoot

Ruft ein Objekt ab, mit dem der Zugriff auf CollectionBase synchronisiert werden kann.

(Geerbt von CollectionBase)
IList.Add(Object)

Fügt am Ende der CollectionBase ein Objekt hinzu.

(Geerbt von CollectionBase)
IList.Contains(Object)

Ermittelt, ob CollectionBase ein bestimmtes Element enthält.

(Geerbt von CollectionBase)
IList.IndexOf(Object)

Sucht nach dem angegebenen Object und gibt den nullbasierten Index des ersten Vorkommens innerhalb der gesamten CollectionBase zurück.

(Geerbt von CollectionBase)
IList.Insert(Int32, Object)

Fügt am angegebenen Index ein Element in die CollectionBase ein.

(Geerbt von CollectionBase)
IList.IsFixedSize

Ruft einen Wert ab, der angibt, ob das CollectionBase eine feste Größe aufweist.

(Geerbt von CollectionBase)
IList.IsReadOnly

Ruft einen Wert ab, der angibt, ob das CollectionBase schreibgeschützt ist.

(Geerbt von CollectionBase)
IList.Item[Int32]

Ruft das Element am angegebenen Index ab oder legt dieses fest.

(Geerbt von CollectionBase)
IList.Remove(Object)

Entfernt das erste Vorkommen eines angegebenen Objekts aus der CollectionBase.

(Geerbt von CollectionBase)

Erweiterungsmethoden

Cast<TResult>(IEnumerable)

Wandelt die Elemente eines IEnumerable in den angegebenen Typ um

OfType<TResult>(IEnumerable)

Filtert die Elemente eines IEnumerable anhand eines angegebenen Typs

AsParallel(IEnumerable)

Ermöglicht die Parallelisierung einer Abfrage.

AsQueryable(IEnumerable)

Konvertiert einen IEnumerable in einen IQueryable.

Gilt für

Siehe auch