WebEventFormatter クラス
アセンブリ: System.Web (system.web.dll 内)


運用および操作の担当者は、ASP.NET Health Monitoring を使用して、配置されている Web アプリケーションを管理できます。System.Web.Management 名前空間には、アプリケーションの状態データをパッケージ化する状態イベント型、およびそのデータを処理するプロバイダ型が含まれます。また、状態イベント管理を支援するサポート型も含まれます。
WebEventFormatter は、イベント関連情報の書式の統一に使用するサポート型です。イベント データのログを記録しておき、後でユーザーに提示する場合に有用です。
状態イベント型で定義されている書式設定メソッドに WebEventFormatter クラスのインスタンスが引数として渡されます。

WebEventFormatter を使用してイベント情報を書式設定する方法を次のコード例に示します。この例の主な目的は、使用するための正しい構文を示すことです。このコード例は、WebBaseEvent クラスのトピックで取り上げているコード例の一部分です。
'Formats Web request event information. Public Overrides Sub FormatCustomEventDetails( _ ByVal formatter As WebEventFormatter) MyBase.FormatCustomEventDetails(formatter) ' Add custom data. formatter.AppendLine("") formatter.IndentationLevel += 1 formatter.TabSize = 4 formatter.AppendLine("*SampleWebBaseEvent Start *") formatter.AppendLine("Custom information goes here") formatter.AppendLine("* SampleWebBaseEvent End *") ' Display custom event timing. formatter.AppendLine(customCreatedMsg) formatter.AppendLine(customRaisedMsg) formatter.IndentationLevel -= 1 End Sub 'FormatCustomEventDetails
//Formats Web request event information. public override void FormatCustomEventDetails( WebEventFormatter formatter) { base.FormatCustomEventDetails(formatter); // Add custom data. formatter.AppendLine(""); formatter.IndentationLevel += 1; formatter.TabSize = 4; formatter.AppendLine( "*SampleWebBaseEvent Start *"); // Display custom event information. formatter.AppendLine(customCreatedMsg); formatter.AppendLine(customRaisedMsg); formatter.AppendLine(firingRecordInfo); formatter.AppendLine( "* SampleWebBaseEvent End *"); formatter.IndentationLevel -= 1; }

System.Web.Management.WebEventFormatter


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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- WebEventFormatter クラスのページへのリンク