This documentation is archived and is not being maintained.
DiscoveryClientProtocol.Download Method
.NET Framework 1.1
Downloads the discovery document at the supplied URL into a Stream object.
Overload List
Downloads the discovery document at the supplied URL into a Stream object.
[Visual Basic] Overloads Public Function Download(ByRef String) As Stream
[C#] public Stream Download(ref string);
[C++] public: Stream* Download(String**);
[JScript] public function Download(String) : Stream;
Downloads the discovery document at the supplied URL into a Stream object, setting the contentType parameter to the MIME encoding of the discovery document.
[Visual Basic] Overloads Public Function Download(ByRef String, ByRef String) As Stream
[C#] public Stream Download(ref string, ref string);
[C++] public: Stream* Download(String**, String**);
[JScript] public function Download(String, String) : Stream;
Example
[Visual Basic, C#, C++] Note This example shows how to use one of the overloaded versions of Download. For other examples that might be available, see the individual overload topics.
[Visual Basic] Dim myDiscoFile As String = "http://localhost/MathService_vb.vsdisco" Dim myEncoding As String = "" Dim myDiscoveryClientProtocol As New DiscoveryClientProtocol() Dim myStream As Stream = myDiscoveryClientProtocol.Download(myDiscoFile, myEncoding) Console.WriteLine("The length of the stream in bytes: " & myStream.Length) Console.WriteLine _ ("The MIME encoding of the downloaded discovery document: " & myEncoding) myStream.Close() [C#] string myDiscoFile = "http://localhost/MathService_cs.vsdisco"; string myEncoding = ""; DiscoveryClientProtocol myDiscoveryClientProtocol = new DiscoveryClientProtocol(); Stream myStream = myDiscoveryClientProtocol.Download (ref myDiscoFile,ref myEncoding); Console.WriteLine("The length of the stream in bytes: "+ myStream.Length); Console.WriteLine("The MIME encoding of the downloaded "+ "discovery document: "+ myEncoding); myStream.Close(); [C++] String* myDiscoFile = S"http://localhost/MathService_cs.vsdisco"; String* myEncoding = S""; DiscoveryClientProtocol* myDiscoveryClientProtocol = new DiscoveryClientProtocol(); Stream* myStream = myDiscoveryClientProtocol->Download (&myDiscoFile,&myEncoding); Console::WriteLine(S"The length of the stream in bytes: {0}", __box(myStream->Length)); Console::WriteLine(S"The MIME encoding of the downloaded discovery document: {0}", myEncoding ); myStream->Close();
[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button
in the upper-left corner of the page.
See Also
DiscoveryClientProtocol Class | DiscoveryClientProtocol Members | System.Web.Services.Discovery Namespace
Show: