DiscoveryDocumentReference.ReadDocument Method (Stream)

 

Reads and returns the discovery document from the passed Stream.

Namespace:   System.Web.Services.Discovery
Assembly:  System.Web.Services (in System.Web.Services.dll)

Public Overrides Function ReadDocument (
	stream As Stream
) As Object

Parameters

stream
Type: System.IO.Stream

Stream containing the discovery document.

Return Value

Type: System.Object

A DiscoveryDocument containing the contents of the referenced discovery document.

Dim myUrl As String = "http://localhost/Sample_vb.vsdisco"
Dim myProtocol As New DiscoveryClientProtocol()
Dim myReference As New DiscoveryDocumentReference(myUrl)
Dim myFileStream As Stream = myProtocol.Download(myUrl)
Dim myDiscoveryDocument As DiscoveryDocument = _
        CType(myReference.ReadDocument(myFileStream), DiscoveryDocument)

.NET Framework
Available since 1.1
Return to top
Show: