WebThreadInformation.FormatToString メソッド
アセンブリ: System.Web (system.web.dll 内)

Dim instance As WebThreadInformation Dim formatter As WebEventFormatter instance.FormatToString(formatter)

FormatToString メソッドを使用すると、イベント情報の形式を統一できます。イベント データのログを記録しておき、後でユーザーに提示する場合に有用です。このメソッドは、プロバイダが ToString メソッドのどれかを呼び出したときに内部的に呼び出されます。

カスタム情報を所定の形式にする方法を次のコード例に示します。
' Formats Web request event information. Public Overrides Sub FormatCustomEventDetails( _ ByVal formatter As WebEventFormatter) ' Add custom data. formatter.AppendLine("") formatter.AppendLine( _ "Custom Thread Information:") formatter.IndentationLevel += 1 ' Display the thread information obtained formatter.AppendLine(GetThreadImpersonation()) formatter.AppendLine(GetThreadStackTrace()) formatter.AppendLine(GetThreadAccountName()) formatter.AppendLine(GetThreadId()) 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 Thread Information:"); formatter.IndentationLevel += 1; // Display the thread information obtained formatter.AppendLine(GetThreadImpersonation()); formatter.AppendLine(GetThreadStackTrace()); formatter.AppendLine(GetThreadAccountName()); formatter.AppendLine(GetThreadId()); formatter.IndentationLevel -= 1; formatter.AppendLine(eventInfo.ToString()); }

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からWebThreadInformation.FormatToString メソッドを検索する場合は、下記のリンクをクリックしてください。

- WebThreadInformation.FormatToString メソッドのページへのリンク