DiscoveryClientDocumentCollection Class
.NET Framework 2.0
Represents a collection of documents discovered during XML Web services discovery that have been downloaded to the client. This class cannot be inherited.
Namespace: System.Web.Services.Discovery
Assembly: System.Web.Services (in system.web.services.dll)
Assembly: System.Web.Services (in system.web.services.dll)
'Declaration Public NotInheritable Class DiscoveryClientDocumentCollection Inherits DictionaryBase 'Usage Dim instance As DiscoveryClientDocumentCollection
public final class DiscoveryClientDocumentCollection extends DictionaryBase
public final class DiscoveryClientDocumentCollection extends DictionaryBase
Not applicable.
The Documents property of DiscoveryClientProtocol is of type DiscoveryClientDocumentCollection.
The following code example enacts XML Web service discovery and downloads the discovered documents to the client. The names of the discovery documents within the DiscoveryClientDocumentCollection are output to the console.
Imports System 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 'Main <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 'Run End Class 'DiscoveryClientDocumentCollectionSample
System.Object
System.Collections.DictionaryBase
System.Web.Services.Discovery.DiscoveryClientDocumentCollection
System.Collections.DictionaryBase
System.Web.Services.Discovery.DiscoveryClientDocumentCollection
Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.Community Additions
ADD
Show: