WebEventBufferFlushInfo クラス
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
フラッシュ バッファーの特性を定義するパラメーターが含まれています。
public ref class WebEventBufferFlushInfo sealed
public sealed class WebEventBufferFlushInfo
type WebEventBufferFlushInfo = class
Public NotInheritable Class WebEventBufferFlushInfo
- 継承
-
WebEventBufferFlushInfo
例
次のコード例は、 WebEventBufferFlushInfo クラスの使用方法を示しています。 このコード例は、 BufferedWebEventProvider クラスに提供されるより大きな例の一部です。
// Processes the messages that have been buffered.
// It is called by the ASP.NET when the flushing of
// the buffer is required.
public override void ProcessEventFlush(
WebEventBufferFlushInfo flushInfo)
{
// Customize event information to be sent to
// the Windows Event Viewer Application Log.
customInfo.AppendLine(
"SampleEventLogWebEventProvider buffer flush.");
customInfo.AppendLine(
string.Format("NotificationType: {0}",
GetNotificationType(flushInfo)));
customInfo.AppendLine(
string.Format("EventsInBuffer: {0}",
GetEventsInBuffer(flushInfo)));
customInfo.AppendLine(
string.Format(
"EventsDiscardedSinceLastNotification: {0}",
GetEventsDiscardedSinceLastNotification(flushInfo)));
// Read each buffered event and send it to the
// Application Log.
foreach (WebBaseEvent eventRaised in flushInfo.Events)
customInfo.AppendLine(eventRaised.ToString());
// Store the information in the specified file.
StoreToFile(customInfo, logFilePath, FileMode.Append);
}
' Processes the messages that have been buffered.
' It is called by the ASP.NET when the flushing of
' the buffer is required according to the parameters
' defined in the <bufferModes> element of the
' <healthMonitoring> configuration section.
Public Overrides Sub ProcessEventFlush(ByVal flushInfo _
As WebEventBufferFlushInfo)
' Customize event information to be sent to
' the Windows Event Viewer Application Log.
customInfo.AppendLine( _
"SampleEventLogWebEventProvider buffer flush.")
customInfo.AppendLine(String.Format( _
"NotificationType: {0}", _
GetNotificationType(flushInfo)))
customInfo.AppendLine(String.Format( _
"EventsInBuffer: {0}", _
GetEventsInBuffer(flushInfo)))
customInfo.AppendLine(String.Format( _
"EventsDiscardedSinceLastNotification: {0}", _
GetEventsDiscardedSinceLastNotification( _
flushInfo)))
' Read each buffered event and send it to the
' Application Log.
Dim eventRaised As WebBaseEvent
For Each eventRaised In flushInfo.Events
customInfo.AppendLine(eventRaised.ToString())
Next eventRaised
' Store the information in the specified file.
StoreToFile(customInfo, logFilePath, _
FileMode.Append)
End Sub
注釈
ASP.NET 正常性の監視により、運用スタッフと運用スタッフはデプロイされた Web アプリケーションを管理できます。 System.Web.Management名前空間には、アプリケーションの正常性状態データのパッケージ化を担当する正常性イベントの種類と、このデータの処理を担当するプロバイダーの種類が含まれています。 また、正常性イベントの管理中に役立つサポート型も含まれています。
WebEventBufferFlushInfo クラスは、バッファーの現在の状態を識別する値を定義します。 クラスのインスタンスは、バッファーに格納されたメッセージを処理する ProcessEventFlush メソッドにパラメーターとして渡されます。 ASP.NET 正常性監視は、バッファーのフラッシュが必要な場合にこのメソッドを呼び出します。 これは、healthMonitoring構成セクションの bufferModes 要素によって定義されたパラメーターによって決まります。
Note
設計上、バッファリング メカニズムでは、受信イベントに合わせていくつかのイベントが削除される場合があります。
bufferModes構成セクションのhealthMonitoring要素を適切に変更して、このメカニズムを調整するのはユーザーの担当です。
プロパティ
| 名前 | 説明 |
|---|---|
| Events |
現在のメッセージのイベント コレクションを取得します。 |
| EventsDiscardedSinceLastNotification |
最後の通知以降に削除されたイベントの数を取得します。 |
| EventsInBuffer |
バッファー内のイベントの数を取得します。 |
| LastNotificationUtc |
最後の通知の日付と時刻を取得します。 |
| NotificationSequence |
現在の通知のメッセージ シーケンスを取得します。 |
| NotificationType |
現在の通知の種類を取得します。 |
メソッド
| 名前 | 説明 |
|---|---|
| Equals(Object) |
指定したオブジェクトが現在のオブジェクトと等しいかどうかを判断します。 (継承元 Object) |
| GetHashCode() |
既定のハッシュ関数として機能します。 (継承元 Object) |
| GetType() |
現在のインスタンスの Type を取得します。 (継承元 Object) |
| MemberwiseClone() |
現在の Objectの簡易コピーを作成します。 (継承元 Object) |
| ToString() |
現在のオブジェクトを表す文字列を返します。 (継承元 Object) |