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

Name Beschreibung
DiscoveryClientResultCollection()

Initialisiert eine neue Instanz der DiscoveryClientResultCollection-Klasse.

Eigenschaften

Name Beschreibung
Capacity

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

(Geerbt von CollectionBase)
Count

Ruft die Anzahl der In der CollectionBase Instanz enthaltenen Elemente ab. Diese Eigenschaft kann nicht außer Kraft gesetzt werden.

(Geerbt von CollectionBase)
InnerList

Ruft eine ArrayList liste der Elemente in der CollectionBase Instanz ab.

(Geerbt von CollectionBase)
Item[Int32]

Dient zum Abrufen oder Festlegen der DiscoveryClientResult Position i des DiscoveryClientResultCollection.

List

Ruft eine IList liste der Elemente in der CollectionBase Instanz ab.

(Geerbt von CollectionBase)

Methoden

Name Beschreibung
Add(DiscoveryClientResult)

Fügt ein DiscoveryClientResult zu dem DiscoveryClientResultCollection hinzu.

Clear()

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

(Geerbt von CollectionBase)
Contains(DiscoveryClientResult)

Bestimmt, ob die DiscoveryClientResultCollection enthält eine bestimmte DiscoveryClientResult.

Equals(Object)

Bestimmt, ob das angegebene Objekt dem aktuellen Objekt entspricht.

(Geerbt von Object)
GetEnumerator()

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

(Geerbt von CollectionBase)
GetHashCode()

Dient als Standardhashfunktion.

(Geerbt von Object)
GetType()

Ruft die Type der aktuellen Instanz ab.

(Geerbt von Object)
MemberwiseClone()

Erstellt eine flache Kopie der aktuellen Object.

(Geerbt von Object)
OnClear()

Führt zusätzliche benutzerdefinierte Prozesse aus, wenn der Inhalt der CollectionBase Instanz gelöscht wird.

(Geerbt von CollectionBase)
OnClearComplete()

Führt zusätzliche benutzerdefinierte Prozesse aus, nachdem der Inhalt der CollectionBase Instanz gelöscht wurde.

(Geerbt von CollectionBase)
OnInsert(Int32, Object)

Führt zusätzliche benutzerdefinierte Prozesse aus, bevor ein neues Element in die CollectionBase Instanz eingefügt wird.

(Geerbt von CollectionBase)
OnInsertComplete(Int32, Object)

Führt zusätzliche benutzerdefinierte Prozesse aus, nachdem ein neues Element in die CollectionBase Instanz eingefügt wurde.

(Geerbt von CollectionBase)
OnRemove(Int32, Object)

Führt zusätzliche benutzerdefinierte Prozesse aus, wenn ein Element aus der CollectionBase Instanz entfernt wird.

(Geerbt von CollectionBase)
OnRemoveComplete(Int32, Object)

Führt zusätzliche benutzerdefinierte Prozesse aus, nachdem ein Element aus der CollectionBase Instanz entfernt wurde.

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

Führt zusätzliche benutzerdefinierte Prozesse aus, bevor ein Wert in der CollectionBase Instanz festgelegt wird.

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

Führt nach dem Festlegen eines Werts in der CollectionBase Instanz weitere benutzerdefinierte Prozesse aus.

(Geerbt von CollectionBase)
OnValidate(Object)

Führt beim Überprüfen eines Werts zusätzliche benutzerdefinierte Prozesse aus.

(Geerbt von CollectionBase)
Remove(DiscoveryClientResult)

Entfernt das erste Vorkommen eines bestimmten DiscoveryClientResult aus dem DiscoveryClientResultCollection.

RemoveAt(Int32)

Entfernt das Element am angegebenen Index der CollectionBase Instanz. Diese Methode kann nicht außer Kraft gesetzt werden.

(Geerbt von CollectionBase)
ToString()

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

(Geerbt von Object)

Explizite Schnittstellenimplementierungen

Name Beschreibung
ICollection.CopyTo(Array, Int32)

Kopiert das Gesamte CollectionBase in einen kompatiblen eindimensionalen Array, beginnend am angegebenen Index des Zielarrays.

(Geerbt von CollectionBase)
ICollection.IsSynchronized

Ruft einen Wert ab, der angibt, ob der Zugriff auf die CollectionBase Synchronisierung (Threadsicher) erfolgt.

(Geerbt von CollectionBase)
ICollection.SyncRoot

Ruft ein Objekt ab, das zum Synchronisieren des Zugriffs auf die CollectionBaseverwendet werden kann.

(Geerbt von CollectionBase)
IList.Add(Object)

Fügt ein Objekt am Ende der .CollectionBase

(Geerbt von CollectionBase)
IList.Contains(Object)

Bestimmt, ob das CollectionBase Element 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 des gesamten CollectionBasezurück.

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

Fügt ein Element in den CollectionBase angegebenen Index ein.

(Geerbt von CollectionBase)
IList.IsFixedSize

Ruft einen Wert ab, der angibt, ob die CollectionBase Größe fest ist.

(Geerbt von CollectionBase)
IList.IsReadOnly

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

(Geerbt von CollectionBase)
IList.Item[Int32]

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

(Geerbt von CollectionBase)
IList.Remove(Object)

Entfernt das erste Vorkommen eines bestimmten Objekts aus dem CollectionBase.

(Geerbt von CollectionBase)

Erweiterungsmethoden

Name Beschreibung
AsParallel(IEnumerable)

Aktiviert die Parallelisierung einer Abfrage.

AsQueryable(IEnumerable)

Wandelt eine IEnumerable in eine IQueryableum.

Cast<TResult>(IEnumerable)

Wandelt die Elemente eines IEnumerable in den angegebenen Typ um.

OfType<TResult>(IEnumerable)

Filtert die Elemente einer IEnumerable basierend auf einem angegebenen Typ.

Gilt für:

Weitere Informationen