DiscoveryClientReferenceCollection DiscoveryClientReferenceCollection DiscoveryClientReferenceCollection DiscoveryClientReferenceCollection Class

Definition

Stellt eine Auflistung vonDiscoveryReference-Objekten dar.Represents a collection of DiscoveryReference objects. Diese Klasse kann nicht vererbt werden.This class cannot be inherited.

public ref class DiscoveryClientReferenceCollection sealed : System::Collections::DictionaryBase
public sealed class DiscoveryClientReferenceCollection : System.Collections.DictionaryBase
type DiscoveryClientReferenceCollection = class
    inherit DictionaryBase
Public NotInheritable Class DiscoveryClientReferenceCollection
Inherits DictionaryBase
Vererbung
DiscoveryClientReferenceCollectionDiscoveryClientReferenceCollectionDiscoveryClientReferenceCollectionDiscoveryClientReferenceCollection

Beispiele

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

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

int main()
{
   DiscoveryClientProtocol^ myDiscoveryClientProtocol = gcnew DiscoveryClientProtocol;
   myDiscoveryClientProtocol->Credentials = CredentialCache::DefaultCredentials;
   
   // 'dataservice.vsdisco' is a sample discovery document.
   String^ myStringUrl = "http://localhost/dataservice.vsdisco";
   
   // Call the Discover method to populate the References property.
   DiscoveryDocument^ myDiscoveryDocument = myDiscoveryClientProtocol->Discover( myStringUrl );
   
   // Resolve all references found in the discovery document.
   myDiscoveryClientProtocol->ResolveAll();
   DiscoveryClientReferenceCollection^ myDiscoveryClientReferenceCollection = myDiscoveryClientProtocol->References;
   
   // Retrieve the keys from the collection.
   ICollection^ myCollection = myDiscoveryClientReferenceCollection->Keys;
   array<Object^>^myObjectCollection = gcnew array<Object^>(myDiscoveryClientReferenceCollection->Count);
   myCollection->CopyTo( myObjectCollection, 0 );
   Console::WriteLine( "The discovery documents, service descriptions, and XML schema" );
   Console::WriteLine( " definitions in the collection are: " );
   for ( int i = 0; i < myObjectCollection->Length; i++ )
   {
      Console::WriteLine( myObjectCollection[ i ] );
   }
   Console::WriteLine( "" );
   
   // Retrieve the values from the collection.
   ICollection^ myCollection1 = myDiscoveryClientReferenceCollection->Values;
   array<Object^>^myObjectCollection1 = gcnew array<Object^>(myDiscoveryClientReferenceCollection->Count);
   myCollection1->CopyTo( myObjectCollection1, 0 );
   Console::WriteLine( "The objects in the collection are: " );
   for ( int i = 0; i < myObjectCollection1->Length; i++ )
   {
      Console::WriteLine( myObjectCollection1[ i ] );
   }
   Console::WriteLine( "" );
   String^ myStringUrl1 = "http://localhost/dataservice.vsdisco";
   if ( myDiscoveryClientReferenceCollection->Contains( myStringUrl1 ) )
   {
      Console::WriteLine( "The document reference {0} is part of the collection.", myStringUrl1 );
   }
}
using System;
using System.Net;
using System.Collections;
using System.Security.Permissions;
using System.Web.Services.Discovery;

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

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

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

      // Resolve all references found in the discovery document.
      myDiscoveryClientProtocol.ResolveAll();
      
      DiscoveryClientReferenceCollection myDiscoveryClientReferenceCollection = 
          myDiscoveryClientProtocol.References;
      
      // Retrieve the keys from the collection.
      ICollection myCollection = myDiscoveryClientReferenceCollection.Keys;
      object[] myObjectCollection = 
          new object[myDiscoveryClientReferenceCollection.Count];
      myCollection.CopyTo(myObjectCollection, 0);
      
      Console.WriteLine("The discovery documents, service descriptions, " +
            "and XML schema");
      Console.WriteLine(" definitions in the collection are: ");
      for (int i=0; i< myObjectCollection.Length; i++)
      {
         Console.WriteLine(myObjectCollection[i]);
      }
      Console.WriteLine("");

      // Retrieve the values from the collection.
      ICollection myCollection1 = myDiscoveryClientReferenceCollection.Values;
      object[] myObjectCollection1 = 
          new object[myDiscoveryClientReferenceCollection.Count];
      myCollection1.CopyTo(myObjectCollection1, 0);
      
      Console.WriteLine("The objects in the collection are: ");
      for (int i=0; i< myObjectCollection1.Length; i++)
      {
         Console.WriteLine(myObjectCollection1[i]);
      }

      Console.WriteLine("");

      string myStringUrl1 = "http://localhost/dataservice.vsdisco";
      if (myDiscoveryClientReferenceCollection.Contains(myStringUrl1))
      {
         Console.WriteLine("The document reference {0} is part of the collection.",
             myStringUrl1);
      }
   }
} 
Imports System.Net
Imports System.Collections
Imports System.Security.Permissions
Imports System.Web.Services.Discovery

Class MyDiscoveryClientReferenceCollection
   
   Shared Sub Main()
      Run()
   End Sub

   <PermissionSetAttribute(SecurityAction.Demand, Name := "FullTrust")> _
   Shared Sub Run()
      Dim myDiscoveryClientProtocol As New DiscoveryClientProtocol()
      
      myDiscoveryClientProtocol.Credentials = CredentialCache.DefaultCredentials
      
      ' 'dataservice.vsdisco' is a sample discovery document.
      Dim myStringUrl As String = "http://localhost/dataservice.vsdisco"
      
      ' Call the Discover method to populate the References property.
      Dim myDiscoveryDocument As DiscoveryDocument = _
          myDiscoveryClientProtocol.Discover(myStringUrl)
      
      ' Resolve all references found in the discovery document.
      myDiscoveryClientProtocol.ResolveAll()
      
      Dim myDiscoveryClientReferenceCollection As DiscoveryClientReferenceCollection = _ 
          myDiscoveryClientProtocol.References

      ' Retrieve the keys from the collection.
      Dim myCollection As ICollection = myDiscoveryClientReferenceCollection.Keys
      Dim myObjectCollection(myDiscoveryClientReferenceCollection.Count) As Object
      myCollection.CopyTo(myObjectCollection, 0)

      Console.WriteLine("The discovery documents, service descriptions, and XML schema")
      Console.WriteLine(" definitions in the collection are:")
      Dim i As Integer
      For i = 0 To myObjectCollection.Length - 1
          Console.WriteLine(myObjectCollection(i))
      Next i

      ' Retrieve the values from the collection.
      Dim myCollection1 As ICollection = myDiscoveryClientReferenceCollection.Values
      Dim myObjectCollection1(myDiscoveryClientReferenceCollection.Count - 1) As Object
      myCollection1.CopyTo(myObjectCollection1, 0)
      
      Console.WriteLine("The objects in the collection are:")
      For i = 0 To myObjectCollection1.Length - 1
          Console.WriteLine(myObjectCollection1(i))
      Next i
      
      
      Dim myStringUrl1 As String = "http://localhost/dataservice.vsdisco"
      If myDiscoveryClientReferenceCollection.Contains(myStringUrl1) Then
          Console.WriteLine("The document reference {0} is part of the collection.", _
              myStringUrl1)
      End If
   End Sub

End Class

Hinweise

Die References -Eigenschaft DiscoveryClientProtocol von ist vom DiscoveryClientReferenceCollectionTyp.The References property of DiscoveryClientProtocol is of type DiscoveryClientReferenceCollection.

Konstruktoren

DiscoveryClientReferenceCollection() DiscoveryClientReferenceCollection() DiscoveryClientReferenceCollection() DiscoveryClientReferenceCollection()

Initialisiert eine neue Instanz der DiscoveryClientReferenceCollection-Klasse.Initializes a new instance of the DiscoveryClientReferenceCollection class.

Eigenschaften

Count Count Count Count

Ruft die Anzahl der Elemente ab, die in der DictionaryBase-Instanz enthalten sind.Gets the number of elements contained in the DictionaryBase instance.

(Inherited from DictionaryBase)
Dictionary Dictionary Dictionary Dictionary

Ruft die Liste der in der DictionaryBase-Instanz enthaltenen Elemente ab.Gets the list of elements contained in the DictionaryBase instance.

(Inherited from DictionaryBase)
ICollection.IsSynchronized ICollection.IsSynchronized ICollection.IsSynchronized ICollection.IsSynchronized

Ruft einen Wert ab, der angibt, ob der Zugriff auf ein DictionaryBase-Objekt synchronisiert (threadsicher) ist.Gets a value indicating whether access to a DictionaryBase object is synchronized (thread safe).

(Inherited from DictionaryBase)
ICollection.SyncRoot ICollection.SyncRoot ICollection.SyncRoot ICollection.SyncRoot

Ruft ein Objekt ab, mit dem der Zugriff auf ein DictionaryBase-Objekt synchronisiert werden kann.Gets an object that can be used to synchronize access to a DictionaryBase object.

(Inherited from DictionaryBase)
IDictionary.IsFixedSize IDictionary.IsFixedSize IDictionary.IsFixedSize IDictionary.IsFixedSize

Ruft einen Wert ab, der angibt, ob ein DictionaryBase-Objekt eine feste Größe hat.Gets a value indicating whether a DictionaryBase object has a fixed size.

(Inherited from DictionaryBase)
IDictionary.IsReadOnly IDictionary.IsReadOnly IDictionary.IsReadOnly IDictionary.IsReadOnly

Ruft einen Wert ab, der angibt, ob ein DictionaryBase-Objekt schreibgeschützt ist.Gets a value indicating whether a DictionaryBase object is read-only.

(Inherited from DictionaryBase)
IDictionary.Item[Object] IDictionary.Item[Object] IDictionary.Item[Object] IDictionary.Item[Object]

Ruft den Wert ab, der dem angegebenen Schlüssel zugeordnet ist, oder legt diesen fest.Gets or sets the value associated with the specified key.

(Inherited from DictionaryBase)
IDictionary.Keys IDictionary.Keys IDictionary.Keys IDictionary.Keys

Ruft ein ICollection-Objekt ab, das die Schlüssel im DictionaryBase-Objekt enthält.Gets an ICollection object containing the keys in the DictionaryBase object.

(Inherited from DictionaryBase)
IDictionary.Values IDictionary.Values IDictionary.Values IDictionary.Values

Ruft ein ICollection-Objekt ab, das die Werte des DictionaryBase-Objekts enthält.Gets an ICollection object containing the values in the DictionaryBase object.

(Inherited from DictionaryBase)
InnerHashtable InnerHashtable InnerHashtable InnerHashtable

Ruft die Liste der in der DictionaryBase-Instanz enthaltenen Elemente ab.Gets the list of elements contained in the DictionaryBase instance.

(Inherited from DictionaryBase)
Item[String] Item[String] Item[String] Item[String]

Ruft ein DiscoveryReference-Objekt mit der angegebenen URL aus der DiscoveryClientReferenceCollection ab oder legt dieses fest.Gets or sets a DiscoveryReference object from the DiscoveryClientReferenceCollection with the specified URL.

Keys Keys Keys Keys

Ruft ein ICollection-Objekt mit allen Schlüsseln aus der DiscoveryClientReferenceCollection ab.Gets an ICollection object with all the keys in the DiscoveryClientReferenceCollection.

Values Values Values Values

Ruft ein ICollection-Objekt mit allen Werten aus der DiscoveryClientReferenceCollection ab.Gets an ICollection object with all the values in the DiscoveryClientReferenceCollection.

Methoden

Add(DiscoveryReference) Add(DiscoveryReference) Add(DiscoveryReference) Add(DiscoveryReference)

Fügt der DiscoveryReference einen DiscoveryClientReferenceCollection hinzu.Adds a DiscoveryReference to the DiscoveryClientReferenceCollection.

Add(String, DiscoveryReference) Add(String, DiscoveryReference) Add(String, DiscoveryReference) Add(String, DiscoveryReference)

Fügt der DiscoveryReference eine DiscoveryClientReferenceCollection mit der angegebenen URL und dem angegebenen Wert hinzu.Adds a DiscoveryReference with the specified URL and value to the DiscoveryClientReferenceCollection.

Clear() Clear() Clear() Clear()

Löscht den Inhalt der DictionaryBase-Instanz.Clears the contents of the DictionaryBase instance.

(Inherited from DictionaryBase)
Contains(String) Contains(String) Contains(String) Contains(String)

Bestimmt, ob die DiscoveryClientReferenceCollection eine DiscoveryReference mit der angegebenen URL enthält.Determines if the DiscoveryClientReferenceCollection contains a DiscoveryReference with the specified URL.

CopyTo(Array, Int32) CopyTo(Array, Int32) CopyTo(Array, Int32) CopyTo(Array, Int32)

Kopiert die DictionaryBase-Elemente am angegebenen Index in ein eindimensionales Array.Copies the DictionaryBase elements to a one-dimensional Array at the specified index.

(Inherited from DictionaryBase)
Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Bestimmt, ob das angegebene Objekt mit dem aktuellen Objekt identisch ist.Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetEnumerator() GetEnumerator() GetEnumerator() GetEnumerator()

Gibt einen IDictionaryEnumerator zurück, der die DictionaryBase-Instanz durchläuft.Returns an IDictionaryEnumerator that iterates through the DictionaryBase instance.

(Inherited from DictionaryBase)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Fungiert als Standardhashfunktion.Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Ruft den Type der aktuellen Instanz ab.Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Erstellt eine flache Kopie des aktuellen Object.Creates a shallow copy of the current Object.

(Inherited from Object)
OnClear() OnClear() OnClear() OnClear()

Führt vor dem Löschen des Inhalts der DictionaryBase-Instanz zusätzliche benutzerdefinierte Prozesse aus.Performs additional custom processes before clearing the contents of the DictionaryBase instance.

(Inherited from DictionaryBase)
OnClearComplete() OnClearComplete() OnClearComplete() OnClearComplete()

Führt nach dem Löschen des Inhalts der DictionaryBase-Instanz zusätzliche benutzerdefinierte Prozesse aus.Performs additional custom processes after clearing the contents of the DictionaryBase instance.

(Inherited from DictionaryBase)
OnGet(Object, Object) OnGet(Object, Object) OnGet(Object, Object) OnGet(Object, Object)

Ruft das Element mit dem angegebenen Schlüssel und Wert aus der DictionaryBase-Instanz ab.Gets the element with the specified key and value in the DictionaryBase instance.

(Inherited from DictionaryBase)
OnInsert(Object, Object) OnInsert(Object, Object) OnInsert(Object, Object) OnInsert(Object, Object)

Führt zusätzliche benutzerdefinierte Prozesse vor dem Einfügen eines neuen Elements in die DictionaryBase-Instanz aus.Performs additional custom processes before inserting a new element into the DictionaryBase instance.

(Inherited from DictionaryBase)
OnInsertComplete(Object, Object) OnInsertComplete(Object, Object) OnInsertComplete(Object, Object) OnInsertComplete(Object, Object)

Führt zusätzliche benutzerdefinierte Prozesse nach dem Einfügen eines neuen Elements in die DictionaryBase-Instanz aus.Performs additional custom processes after inserting a new element into the DictionaryBase instance.

(Inherited from DictionaryBase)
OnRemove(Object, Object) OnRemove(Object, Object) OnRemove(Object, Object) OnRemove(Object, Object)

Führt zusätzliche benutzerdefinierte Prozesse vor dem Entfernen eines Elements aus der DictionaryBase-Instanz aus.Performs additional custom processes before removing an element from the DictionaryBase instance.

(Inherited from DictionaryBase)
OnRemoveComplete(Object, Object) OnRemoveComplete(Object, Object) OnRemoveComplete(Object, Object) OnRemoveComplete(Object, Object)

Führt zusätzliche benutzerdefinierte Prozesse nach dem Entfernen eines Elements aus der DictionaryBase-Instanz aus.Performs additional custom processes after removing an element from the DictionaryBase instance.

(Inherited from DictionaryBase)
OnSet(Object, Object, Object) OnSet(Object, Object, Object) OnSet(Object, Object, Object) OnSet(Object, Object, Object)

Führt zusätzliche benutzerdefinierte Prozesse vor dem Festlegen eines Werts in der DictionaryBase-Instanz aus.Performs additional custom processes before setting a value in the DictionaryBase instance.

(Inherited from DictionaryBase)
OnSetComplete(Object, Object, Object) OnSetComplete(Object, Object, Object) OnSetComplete(Object, Object, Object) OnSetComplete(Object, Object, Object)

Führt zusätzliche benutzerdefinierte Prozesse nach dem Festlegen eines Werts in der DictionaryBase-Instanz aus.Performs additional custom processes after setting a value in the DictionaryBase instance.

(Inherited from DictionaryBase)
OnValidate(Object, Object) OnValidate(Object, Object) OnValidate(Object, Object) OnValidate(Object, Object)

Führt bei der Überprüfung des Elements mit dem angegebenen Schlüssel und Wert zusätzliche benutzerdefinierte Aktionen aus.Performs additional custom processes when validating the element with the specified key and value.

(Inherited from DictionaryBase)
Remove(String) Remove(String) Remove(String) Remove(String)

Entfernt eine DiscoveryReference mit der angegebenen URL aus der DiscoveryClientReferenceCollection.Removes a DiscoveryReference with the specified URL from the DiscoveryClientReferenceCollection.

ToString() ToString() ToString() ToString()

Gibt eine Zeichenfolge zurück, die das aktuelle Objekt darstellt.Returns a string that represents the current object.

(Inherited from Object)

Explizite Schnittstellenimplementierungen

IDictionary.Add(Object, Object) IDictionary.Add(Object, Object) IDictionary.Add(Object, Object) IDictionary.Add(Object, Object)

Fügt dem DictionaryBase ein Element mit dem angegebenen Schlüssel und Wert hinzu.Adds an element with the specified key and value into the DictionaryBase.

(Inherited from DictionaryBase)
IDictionary.Contains(Object) IDictionary.Contains(Object) IDictionary.Contains(Object) IDictionary.Contains(Object)

Stellt fest, ob der DictionaryBase einen bestimmten Schlüssel enthält.Determines whether the DictionaryBase contains a specific key.

(Inherited from DictionaryBase)
IDictionary.Remove(Object) IDictionary.Remove(Object) IDictionary.Remove(Object) IDictionary.Remove(Object)

Entfernt das Element mit dem angegebenen Schlüssel aus dem DictionaryBase.Removes the element with the specified key from the DictionaryBase.

(Inherited from DictionaryBase)
IEnumerable.GetEnumerator() IEnumerable.GetEnumerator() IEnumerable.GetEnumerator() IEnumerable.GetEnumerator()

Gibt einen IEnumerator zurück, der DictionaryBase durchläuft.Returns an IEnumerator that iterates through the DictionaryBase.

(Inherited from DictionaryBase)

Erweiterungsmethoden

Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable)

Wandelt die Elemente eines IEnumerable in den angegebenen Typ umCasts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable)

Filtert die Elemente eines IEnumerable anhand eines angegebenen TypsFilters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable)

Ermöglicht die Parallelisierung einer Abfrage.Enables parallelization of a query.

AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable)

Konvertiert einen IEnumerable in einen IQueryable.Converts an IEnumerable to an IQueryable.

Gilt für: