BufferedWebEventProvider.ProcessEvent(WebBaseEvent) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Processes the event passed to the provider.
public:
override void ProcessEvent(System::Web::Management::WebBaseEvent ^ eventRaised);
public override void ProcessEvent (System.Web.Management.WebBaseEvent eventRaised);
override this.ProcessEvent : System.Web.Management.WebBaseEvent -> unit
Public Overrides Sub ProcessEvent (eventRaised As WebBaseEvent)
Parameters
- eventRaised
- WebBaseEvent
The WebBaseEvent object to process.
Examples
The following code example shows how to implement the ProcessEvent method.
// Processes the incoming events.
// This method performs custom processing and,
// if buffering is enabled, it calls the
// base.ProcessEvent to buffer the event
// information.
public override void ProcessEvent(
WebBaseEvent eventRaised)
{
if (UseBuffering)
{
// Buffering enabled, call the
// base event to buffer event information.
base.ProcessEvent(eventRaised);
}
else
{
// Buffering disabled, store the
// current event now.
customInfo.AppendLine(
"*** Buffering disabled ***");
customInfo.AppendLine(
eventRaised.ToString());
// Store the information in the specified file.
StoreToFile(customInfo,
logFilePath, FileMode.Append);
}
}
' Processes the incoming events.
' This method performs custom
' processing and, if buffering is
' enabled, it calls the base.ProcessEvent
' to buffer the event information.
Public Overrides Sub ProcessEvent( _
ByVal eventRaised As WebBaseEvent)
If UseBuffering Then
' Buffering enabled, call the base event to
' buffer event information.
MyBase.ProcessEvent(eventRaised)
Else
' Buffering disabled, store the current event
' now.
customInfo.AppendLine("*** Buffering disabled ***")
customInfo.AppendLine(eventRaised.ToString())
' Store the information in the specified file.
StoreToFile(customInfo, _
logFilePath, FileMode.Append)
End If
End Sub
Remarks
This is the method that ASP.NET health monitoring calls to start the processing of the event. If buffering is enabled, the event information is buffered; otherwise, it is dispatched to the current logging mechanism.
Applies to
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
.NET