BufferedWebEventProvider.ProcessEvent Method (WebBaseEvent)

 

Processes the event passed to the provider.

Namespace:   System.Web.Management
Assembly:  System.Web (in System.Web.dll)

Public Overrides Sub ProcessEvent (
	eventRaised As WebBaseEvent
)

Parameters

eventRaised
Type: System.Web.Management.WebBaseEvent

The WebBaseEvent object to process.

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.

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 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 'ProcessEvent

.NET Framework
Available since 2.0
Return to top
Show: