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 상태 모니터링을 사용하면 프로덕션 및 운영 직원이 배포된 웹 애플리케이션을 관리할 수 있습니다. 네임스페이스에는 System.Web.Management 애플리케이션 상태 데이터 패키징을 담당하는 상태 이벤트 유형과 이 데이터 처리를 담당하는 공급자 유형이 포함됩니다. 또한 상태 이벤트를 관리하는 동안 도움이 되는 지원 유형도 포함합니다.
이 클래스는 WebEventBufferFlushInfo 버퍼의 현재 상태를 식별하는 값을 정의합니다. 클래스의 인스턴스는 버퍼링된 메시지를 처리하는 메서드에 매개 변수 ProcessEventFlush 로 전달됩니다. ASP.NET 상태 모니터링은 버퍼 플러시가 필요할 때 이 메서드를 호출합니다. 구성 섹션의 요소에 의해 정의된 매개 변수에 bufferModeshealthMonitoring 의해 결정됩니다.
메모
기본적으로 버퍼링 메커니즘은 들어오는 이벤트와 보조를 맞추기 위해 일부 이벤트를 삭제할 수 있습니다. 구성 섹션의 요소를 올바르게 수정하여 이 메커니즘을 bufferModes 조정하는 것은 사용자의 달려 있습니다 healthMonitoring .
속성
| Name | Description |
|---|---|
| Events |
현재 메시지의 이벤트 컬렉션을 가져옵니다. |
| EventsDiscardedSinceLastNotification |
마지막 알림 이후 삭제된 이벤트 수를 가져옵니다. |
| EventsInBuffer |
버퍼의 이벤트 수를 가져옵니다. |
| LastNotificationUtc |
마지막 알림의 날짜 및 시간을 가져옵니다. |
| NotificationSequence |
현재 알림의 메시지 순서를 가져옵니다. |
| NotificationType |
현재 알림 유형을 가져옵니다. |
메서드
| Name | Description |
|---|---|
| Equals(Object) |
지정된 개체가 현재 개체와 같은지 여부를 확인합니다. (다음에서 상속됨 Object) |
| GetHashCode() |
기본 해시 함수로 사용됩니다. (다음에서 상속됨 Object) |
| GetType() |
현재 인스턴스의 Type 가져옵니다. (다음에서 상속됨 Object) |
| MemberwiseClone() |
현재 Object단순 복사본을 만듭니다. (다음에서 상속됨 Object) |
| ToString() |
현재 개체를 나타내는 문자열을 반환합니다. (다음에서 상속됨 Object) |