DiscoveryDocumentとは? わかりやすく解説

DiscoveryDocument クラス

探索ドキュメント表します。このクラス継承できません。

名前空間: System.Web.Services.Discovery
アセンブリ: System.Web.Services (system.web.services.dll 内)
構文構文

Public NotInheritable Class
 DiscoveryDocument
Dim instance As DiscoveryDocument
public sealed class DiscoveryDocument
public ref class DiscoveryDocument sealed
public final class DiscoveryDocument
public final class DiscoveryDocument
解説解説
使用例使用例

Read使用してファイルか探索ドキュメント読み込み、このドキュメントWrite メソッド使用してファイル書き込むコード例次に示します

Imports System
Imports System.Xml
Imports System.IO
Imports System.Web.Services.Discovery
Imports System.Collections


Public Class DiscoveryDocument_Example
   
   Shared Sub Main()
      Try
         ' Create an object of the 'DiscoveryDocument'.
         Dim myDiscoveryDocument As New
 DiscoveryDocument()
         
         ' Create an XmlTextReader with the sample file.
         Dim myXmlTextReader As New
 XmlTextReader("http://localhost/example_vb.disco")
         
         ' Read the given XmlTextReader.
         myDiscoveryDocument = DiscoveryDocument.Read(myXmlTextReader)
         
         ' Write the DiscoveryDocument into the 'TextWriter'.
         Dim myFileStream As New
 FileStream("log.txt", FileMode.OpenOrCreate, FileAccess.Write)
         Dim myStreamWriter As New
 StreamWriter(myFileStream)
         myDiscoveryDocument.Write(myStreamWriter)

         myStreamWriter.Flush()
         myStreamWriter.Close()
         ' Display the contents of the DiscoveryDocument onto the console.
         Dim myFileStream1 As New
 FileStream("log.txt", FileMode.OpenOrCreate, FileAccess.Read)
         Dim myStreamReader As New
 StreamReader(myFileStream1)
         
         ' Set the file pointer to the begin.
         myStreamReader.BaseStream.Seek(0, SeekOrigin.Begin)
         Console.WriteLine("The contents of the DiscoveryDocument
 are-")
         While myStreamReader.Peek() > - 1
            Console.WriteLine(myStreamReader.ReadLine())
         End While
         myStreamReader.Close()
      Catch e As Exception
         Console.WriteLine("Exception raised : {0}",
 e.Message.ToString())
      End Try
   End Sub 'Main
End Class 'DiscoveryDocument_Example
using System;
using System.Xml;
using System.IO;
using System.Web.Services.Discovery;
using System.Collections;

public class DiscoveryDocument_Example
{
   static void Main()
   {
      try
      {
         // Create an object of the 'DiscoveryDocument'.
         DiscoveryDocument myDiscoveryDocument = new DiscoveryDocument();

         // Create an XmlTextReader with the sample file.
         XmlTextReader myXmlTextReader = new 
            XmlTextReader( "http://localhost/example_cs.disco"
 );

         // Read the given XmlTextReader.
         myDiscoveryDocument = DiscoveryDocument.Read( myXmlTextReader );

         // Write the DiscoveryDocument into the 'TextWriter'.
         FileStream myFileStream = new 
                  FileStream( "log.txt", FileMode.OpenOrCreate, FileAccess.Write
 );
         StreamWriter myStreamWriter = new StreamWriter( myFileStream
 );
         myDiscoveryDocument.Write( myStreamWriter );

         myStreamWriter.Flush();  
         myStreamWriter.Close(); 

         // Display the contents of the DiscoveryDocument onto the console.
         FileStream myFileStream1 = new
                        FileStream( "log.txt", FileMode.OpenOrCreate, FileAccess.Read
 );
         StreamReader myStreamReader = new StreamReader( myFileStream1
 );        

         // Set the file pointer to the begin.
         myStreamReader.BaseStream.Seek(0, SeekOrigin.Begin); 
         Console.WriteLine( "The contents of the DiscoveryDocument are-"
 );
         while ( myStreamReader.Peek() > -1 ) 
         {
            Console.WriteLine( myStreamReader.ReadLine() );
         }
         myStreamReader.Close();
      }
      catch( Exception e )
      {
         Console.WriteLine( "Exception raised : {0}", e.Message);
      }
   }
}
#using <System.Xml.dll>
#using <System.Web.Services.dll>

using namespace System;
using namespace System::Xml;
using namespace System::IO;
using namespace System::Web::Services::Discovery;
using namespace System::Collections;
int main()
{
   try
   {
      
      // Create an Object* of the 'DiscoveryDocument'.
      DiscoveryDocument^ myDiscoveryDocument = gcnew DiscoveryDocument;
      
      // Create an XmlTextReader with the sample file.
      XmlTextReader^ myXmlTextReader = gcnew XmlTextReader( "http://localhost/example_cs.disco"
 );
      
      // Read the given XmlTextReader.
      myDiscoveryDocument = DiscoveryDocument::Read( myXmlTextReader );
      
      // Write the DiscoveryDocument into the 'TextWriter'.
      FileStream^ myFileStream = gcnew FileStream( "log.txt",FileMode::OpenOrCreate,FileAccess::Write
 );
      StreamWriter^ myStreamWriter = gcnew StreamWriter( myFileStream );
      myDiscoveryDocument->Write( myStreamWriter );
      myStreamWriter->Flush();
      myStreamWriter->Close();
      
      // Display the contents of the DiscoveryDocument onto the console.
      FileStream^ myFileStream1 = gcnew FileStream( "log.txt",FileMode::OpenOrCreate,FileAccess::Read
 );
      StreamReader^ myStreamReader = gcnew StreamReader( myFileStream1 );
      
      // Set the file pointer to the begin.
      myStreamReader->BaseStream->Seek( 0, SeekOrigin::Begin );
      Console::WriteLine( "The contents of the DiscoveryDocument are-"
 );
      while ( myStreamReader->Peek() > -1 )
      {
         Console::WriteLine( myStreamReader->ReadLine() );
      }
      myStreamReader->Close();
   }
   catch ( Exception^ e ) 
   {
      Console::WriteLine( "Exception raised : {0}", e->Message );
   }

}

import System.*;
import System.Xml.*;
import System.IO.*;
import System.Web.Services.Discovery.*;
import System.Collections.*;

public class DiscoveryDocumentExample
{
    public static void main(String[]
 args)
    {
        try {
            // Create an object of the 'DiscoveryDocument'.
            DiscoveryDocument myDiscoveryDocument = new DiscoveryDocument();

            // Create an XmlTextReader with the sample file.
            XmlTextReader myXmlTextReader = 
                new XmlTextReader("http://localhost/example_jsl.disco");

            // Read the given XmlTextReader.
            myDiscoveryDocument = DiscoveryDocument.Read(myXmlTextReader);

            // Write the DiscoveryDocument into the 'TextWriter'.
            FileStream myFileStream = new FileStream("log.txt",
 
                FileMode.OpenOrCreate, FileAccess.Write);
            StreamWriter myStreamWriter = new StreamWriter(myFileStream);
            myDiscoveryDocument.Write(myStreamWriter);
            myStreamWriter.Flush();
            myStreamWriter.Close();
            // Display the contents of the DiscoveryDocument onto the
 console.
            FileStream myFileStream1 = new FileStream("log.txt"
,
                FileMode.OpenOrCreate, FileAccess.Read);
            StreamReader myStreamReader = new StreamReader(myFileStream1);

            // Set the file pointer to the begin.
            myStreamReader.get_BaseStream().Seek(0, SeekOrigin.Begin);
            Console.WriteLine("The contents of the DiscoveryDocument are-");
            while (myStreamReader.Peek() > -1) {
                Console.WriteLine(myStreamReader.ReadLine());
            }
            myStreamReader.Close();
        }
        catch (System.Exception e) {
            Console.WriteLine("Exception raised : {0}", e.get_Message());
        }
    } //main
} //DiscoveryDocumentExample
継承階層継承階層
System.Object
  System.Web.Services.Discovery.DiscoveryDocument
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
DiscoveryDocument メンバ
System.Web.Services.Discovery 名前空間
DiscoveryClientProtocol クラス

DiscoveryDocument コンストラクタ


DiscoveryDocument フィールド


パブリック フィールドパブリック フィールド

参照参照

関連項目

DiscoveryDocument クラス
System.Web.Services.Discovery 名前空間
DiscoveryClientProtocol クラス

DiscoveryDocument プロパティ


パブリック プロパティパブリック プロパティ

参照参照

関連項目

DiscoveryDocument クラス
System.Web.Services.Discovery 名前空間
DiscoveryClientProtocol クラス

DiscoveryDocument メソッド


パブリック メソッドパブリック メソッド

プロテクト メソッドプロテクト メソッド
参照参照

関連項目

DiscoveryDocument クラス
System.Web.Services.Discovery 名前空間
DiscoveryClientProtocol クラス

DiscoveryDocument メンバ

探索ドキュメント表します。このクラス継承できません。

DiscoveryDocument データ型公開されるメンバを以下の表に示します


パブリック コンストラクタパブリック コンストラクタ
  名前 説明
パブリック メソッド DiscoveryDocument DiscoveryDocument クラス新しインスタンス初期化します。
パブリック フィールドパブリック フィールド
パブリック プロパティパブリック プロパティ
パブリック メソッドパブリック メソッド
プロテクト メソッドプロテクト メソッド
参照参照

関連項目

DiscoveryDocument クラス
System.Web.Services.Discovery 名前空間
DiscoveryClientProtocol クラス



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「DiscoveryDocument」の関連用語

DiscoveryDocumentのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



DiscoveryDocumentのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS