次の方法で共有


DiscoveryClientProtocol.Download メソッド

指定された URL の探索ドキュメントを Stream オブジェクトにダウンロードします。

オーバーロードの一覧

指定された URL の探索ドキュメントを Stream オブジェクトにダウンロードします。

[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;

contentType パラメータを探索ドキュメントの MIME エンコーディングに設定して、指定された URL の探索ドキュメントを Stream オブジェクトにダウンロードします。

[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;

使用例

[Visual Basic, C#, C++] メモ   ここでは、Download のオーバーロード形式のうちの 1 つだけについて、使用例を示します。その他の例については、各オーバーロード形式のトピックを参照してください。

 
Dim myDiscoFile As String = "https://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 = "https://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"https://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] JScript のサンプルはありません。Visual Basic、C#、および C++ のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン 言語のフィルタ をクリックします。

参照

DiscoveryClientProtocol クラス | DiscoveryClientProtocol メンバ | System.Web.Services.Discovery 名前空間