WebRequestInformation.FormatToString メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > WebRequestInformation.FormatToString メソッドの意味・解説 

WebRequestInformation.FormatToString メソッド

メモ : このメソッドは、.NET Framework version 2.0新しく追加されたものです。

Web 要求情報書式設定ます。

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

Public Sub FormatToString ( _
    formatter As WebEventFormatter _
)
Dim instance As WebRequestInformation
Dim formatter As WebEventFormatter

instance.FormatToString(formatter)
public void FormatToString (
    WebEventFormatter formatter
)
public:
void FormatToString (
    WebEventFormatter^ formatter
)
public void FormatToString (
    WebEventFormatter formatter
)
public function FormatToString (
    formatter : WebEventFormatter
)

パラメータ

formatter

Web の状態イベント情報書式設定使用するタブインデント設定格納している WebEventFormatter。

解説解説
使用例使用例

カスタム情報所定形式にする方法次のコード例示します

' Formats Web request event information.
 Public Overrides Sub FormatCustomEventDetails(
 _
 ByVal formatter As WebEventFormatter)

     ' Add custom data.
     formatter.AppendLine("")
     formatter.AppendLine("Custom Request Information:")

     formatter.IndentationLevel += 1

     ' Display the request information obtained 
     ' using the WebRequestInformation object.
     formatter.AppendLine(GetRequestPath())
     formatter.AppendLine(GetRequestUrl())
     formatter.AppendLine(GetRequestUserHostAdddress())
     formatter.AppendLine(GetRequestPrincipal())
     formatter.IndentationLevel -= 1

     formatter.AppendLine(eventInfo.ToString())
 End Sub 'FormatCustomEventDetails
 
// Formats Web request event information.
public override void FormatCustomEventDetails(
 WebEventFormatter formatter)
{

    // Add custom data.

    formatter.AppendLine("");
    formatter.AppendLine(
        "Custom Request Information:");

    formatter.IndentationLevel += 1;

    // Display the request information obtained 
    // using the WebRequestInformation object.
    formatter.AppendLine(GetRequestPath());
    formatter.AppendLine(GetRequestUrl());
    formatter.AppendLine(GetRequestUserHostAdddress());
    formatter.AppendLine(GetRequestPrincipal());

    formatter.IndentationLevel -= 1;

    formatter.AppendLine(eventInfo.ToString());

}

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
WebRequestInformation クラス
WebRequestInformation メンバ
System.Web.Management 名前空間



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

辞書ショートカット

すべての辞書の索引

WebRequestInformation.FormatToString メソッドのお隣キーワード
検索ランキング

   

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



WebRequestInformation.FormatToString メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2025 GRAS Group, Inc.RSS