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

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

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

カスタム情報を所定の形式にする方法を次のコード例に示します。
'Formats Web request event information. Public Overrides Sub FormatCustomEventDetails( _ ByVal formatter _ As System.Web.Management.WebEventFormatter) MyBase.FormatCustomEventDetails(formatter) ' Add custom data. formatter.AppendLine("") formatter.AppendLine( _ "Custom Process Information:") formatter.IndentationLevel += 1 ' Display the process information. formatter.AppendLine(GetAccountName()) formatter.AppendLine(GetProcessId()) formatter.AppendLine(GetProcessName()) formatter.IndentationLevel -= 1 formatter.AppendLine(eventInfo.ToString()) End Sub 'FormatToString
//Formats Web request event information. public override void FormatCustomEventDetails( WebEventFormatter formatter) { base.FormatCustomEventDetails(formatter); // Add custom data. formatter.AppendLine("Custom Process Information:"); formatter.IndentationLevel += 1; // Display the process information. formatter.AppendLine(GetAccountName()); formatter.AppendLine(GetProcessId()); formatter.AppendLine(GetProcessName()); 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に収録されているすべての辞書からWebProcessInformation.FormatToString メソッドを検索する場合は、下記のリンクをクリックしてください。

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