DiscoveryClientDocumentCollection Třída
Definice
Představuje kolekci dokumentů zjištěných během zjišťování webových služeb XML, které byly staženy do klienta nástroje.Represents a collection of documents discovered during XML Web services discovery that have been downloaded to the client. Tuto třídu nelze zdědit.This class cannot be inherited.
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
- Dědičnost
Příklady
Následující příklad kódu přijedná zjišťování webové služby XML a stáhne zjištěné dokumenty do klienta.The following code example enacts XML Web service discovery and downloads the discovered documents to the client. Názvy dokumentů zjišťování v rámci DiscoveryClientDocumentCollection jsou výstupem do konzoly.The names of the discovery documents within the DiscoveryClientDocumentCollection are output to the console.
#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
Poznámky
DocumentsVlastnost DiscoveryClientProtocol je typu DiscoveryClientDocumentCollection .The Documents property of DiscoveryClientProtocol is of type DiscoveryClientDocumentCollection.
Konstruktory
DiscoveryClientDocumentCollection() |
Inicializuje novou instanci DiscoveryClientDocumentCollection třídy.Initializes a new instance of the DiscoveryClientDocumentCollection class. |
Vlastnosti
Count |
Získá počet prvků obsažených v DictionaryBase instanci.Gets the number of elements contained in the DictionaryBase instance. (Zděděno od DictionaryBase) |
Dictionary |
Získá seznam elementů obsažených v DictionaryBase instanci.Gets the list of elements contained in the DictionaryBase instance. (Zděděno od DictionaryBase) |
InnerHashtable |
Získá seznam elementů obsažených v DictionaryBase instanci.Gets the list of elements contained in the DictionaryBase instance. (Zděděno od DictionaryBase) |
Item[String] |
Získá nebo nastaví objekt dokumentu zjišťování klienta ze DiscoveryClientDocumentCollection zadané adresy URL.Gets or sets a client discovery document object from the DiscoveryClientDocumentCollection with the specified URL. |
Keys |
Získá ICollection objekt se všemi klíči v DiscoveryClientDocumentCollection .Gets an ICollection object with all the keys in the DiscoveryClientDocumentCollection. |
Values |
Získá ICollection objekt se všemi hodnotami v DiscoveryClientDocumentCollection .Gets an ICollection object with all the values in the DiscoveryClientDocumentCollection. |
Metody
Add(String, Object) |
Přidá objekt se zadanou adresou URL do DiscoveryClientDocumentCollection .Adds an object with the specified URL to the DiscoveryClientDocumentCollection. |
Clear() |
Vymaže obsah DictionaryBase instance.Clears the contents of the DictionaryBase instance. (Zděděno od DictionaryBase) |
Contains(String) |
Určuje, zda DiscoveryClientDocumentCollection obsahuje objekt se zadanou adresou URL.Determines if the DiscoveryClientDocumentCollection contains an object with the specified URL. |
CopyTo(Array, Int32) |
Zkopíruje DictionaryBase prvky na jednorozměrné Array v zadaném indexu.Copies the DictionaryBase elements to a one-dimensional Array at the specified index. (Zděděno od DictionaryBase) |
Equals(Object) |
Určí, zda se zadaný objekt rovná aktuálnímu objektu.Determines whether the specified object is equal to the current object. (Zděděno od Object) |
GetEnumerator() |
Vrátí objekt IDictionaryEnumerator , který prochází DictionaryBase instancí.Returns an IDictionaryEnumerator that iterates through the DictionaryBase instance. (Zděděno od DictionaryBase) |
GetHashCode() |
Slouží jako výchozí funkce hash.Serves as the default hash function. (Zděděno od Object) |
GetType() |
Získá Type aktuální instanci.Gets the Type of the current instance. (Zděděno od Object) |
MemberwiseClone() |
Vytvoří kopii aktuálního seznamu Object .Creates a shallow copy of the current Object. (Zděděno od Object) |
OnClear() |
Před vymazáním obsahu instance provede další vlastní procesy DictionaryBase .Performs additional custom processes before clearing the contents of the DictionaryBase instance. (Zděděno od DictionaryBase) |
OnClearComplete() |
Provede další vlastní procesy po vymazání obsahu DictionaryBase instance.Performs additional custom processes after clearing the contents of the DictionaryBase instance. (Zděděno od DictionaryBase) |
OnGet(Object, Object) |
Získá prvek se zadaným klíčem a hodnotou v DictionaryBase instanci.Gets the element with the specified key and value in the DictionaryBase instance. (Zděděno od DictionaryBase) |
OnInsert(Object, Object) |
Provede další vlastní procesy před vložením nového elementu do DictionaryBase instance.Performs additional custom processes before inserting a new element into the DictionaryBase instance. (Zděděno od DictionaryBase) |
OnInsertComplete(Object, Object) |
Provede další vlastní procesy po vložení nového elementu do DictionaryBase instance.Performs additional custom processes after inserting a new element into the DictionaryBase instance. (Zděděno od DictionaryBase) |
OnRemove(Object, Object) |
Provede další vlastní procesy před odebráním elementu z DictionaryBase instance.Performs additional custom processes before removing an element from the DictionaryBase instance. (Zděděno od DictionaryBase) |
OnRemoveComplete(Object, Object) |
Provede další vlastní procesy po odebrání elementu z DictionaryBase instance.Performs additional custom processes after removing an element from the DictionaryBase instance. (Zděděno od DictionaryBase) |
OnSet(Object, Object, Object) |
Před nastavením hodnoty v instanci provádí další vlastní procesy DictionaryBase .Performs additional custom processes before setting a value in the DictionaryBase instance. (Zděděno od DictionaryBase) |
OnSetComplete(Object, Object, Object) |
Provede další vlastní procesy po nastavení hodnoty v DictionaryBase instanci.Performs additional custom processes after setting a value in the DictionaryBase instance. (Zděděno od DictionaryBase) |
OnValidate(Object, Object) |
Provádí další vlastní procesy při ověřování elementu pomocí zadaného klíče a hodnoty.Performs additional custom processes when validating the element with the specified key and value. (Zděděno od DictionaryBase) |
Remove(String) |
Odebere objekt se zadanou adresou URL z DiscoveryClientDocumentCollection .Removes an object with the specified URL from the DiscoveryClientDocumentCollection. |
ToString() |
Vrátí řetězec, který představuje aktuální objekt.Returns a string that represents the current object. (Zděděno od Object) |
Explicitní implementace rozhraní
ICollection.IsSynchronized |
Načte hodnotu, která označuje, jestli je přístup k DictionaryBase objektu synchronizovaný (bezpečná pro vlákno).Gets a value indicating whether access to a DictionaryBase object is synchronized (thread safe). (Zděděno od DictionaryBase) |
ICollection.SyncRoot |
Získává objekt, který lze použít k synchronizaci přístupu k DictionaryBase objektu.Gets an object that can be used to synchronize access to a DictionaryBase object. (Zděděno od DictionaryBase) |
IDictionary.Add(Object, Object) |
Přidá prvek se zadaným klíčem a hodnotou do DictionaryBase .Adds an element with the specified key and value into the DictionaryBase. (Zděděno od DictionaryBase) |
IDictionary.Contains(Object) |
Určuje, zda DictionaryBase obsahuje konkrétní klíč.Determines whether the DictionaryBase contains a specific key. (Zděděno od DictionaryBase) |
IDictionary.IsFixedSize |
Získá hodnotu, která označuje, zda DictionaryBase má objekt pevnou velikost.Gets a value indicating whether a DictionaryBase object has a fixed size. (Zděděno od DictionaryBase) |
IDictionary.IsReadOnly |
Získá hodnotu, která označuje, zda DictionaryBase je objekt určen jen pro čtení.Gets a value indicating whether a DictionaryBase object is read-only. (Zděděno od DictionaryBase) |
IDictionary.Item[Object] |
Získá nebo nastaví hodnotu přidruženou k zadanému klíči.Gets or sets the value associated with the specified key. (Zděděno od DictionaryBase) |
IDictionary.Keys |
Získá ICollection objekt obsahující klíče v DictionaryBase objektu.Gets an ICollection object containing the keys in the DictionaryBase object. (Zděděno od DictionaryBase) |
IDictionary.Remove(Object) |
Odebere prvek se zadaným klíčem z DictionaryBase .Removes the element with the specified key from the DictionaryBase. (Zděděno od DictionaryBase) |
IDictionary.Values |
Získá ICollection objekt obsahující hodnoty v DictionaryBase objektu.Gets an ICollection object containing the values in the DictionaryBase object. (Zděděno od DictionaryBase) |
IEnumerable.GetEnumerator() |
Vrátí objekt IEnumerator , který projde DictionaryBase .Returns an IEnumerator that iterates through the DictionaryBase. (Zděděno od DictionaryBase) |
Metody rozšíření
Cast<TResult>(IEnumerable) |
Přetypování prvky IEnumerable na zadaný typ.Casts the elements of an IEnumerable to the specified type. |
OfType<TResult>(IEnumerable) |
Filtruje prvky IEnumerable založené na zadaném typu.Filters the elements of an IEnumerable based on a specified type. |
AsParallel(IEnumerable) |
Povoluje paralelní zpracování dotazu.Enables parallelization of a query. |
AsQueryable(IEnumerable) |
Převede IEnumerable na IQueryable .Converts an IEnumerable to an IQueryable. |