Redigera

Dela via


WebEventProvider.ProcessEvent(WebBaseEvent) Method

Definition

Processes the event passed to the provider.

public:
 abstract void ProcessEvent(System::Web::Management::WebBaseEvent ^ raisedEvent);
public abstract void ProcessEvent (System.Web.Management.WebBaseEvent raisedEvent);
abstract member ProcessEvent : System.Web.Management.WebBaseEvent -> unit
Public MustOverride Sub ProcessEvent (raisedEvent As WebBaseEvent)

Parameters

raisedEvent
WebBaseEvent

The WebBaseEvent object to process.

Examples

The following code example shows how to implement the ProcessEvent method. This method appends the customized string representation of the event to a specific log file.


// Process the event that has been raised.
public override void ProcessEvent(WebBaseEvent raisedEvent)
{ 
    if (msgCounter < maxMsgNumber)
    {
        // Buffer the event information.
        msgBuffer.Enqueue(raisedEvent);
        // Increment the message counter.
        msgCounter += 1;
    }
    else
    {
        // Flush the buffer.
        Flush();
    }
}
' Process the event that has been raised.
Public Overrides Sub ProcessEvent( _
ByVal raisedEvent As WebBaseEvent)

    If msgCounter < maxMsgNumber Then
        ' Buffer the event information.
        msgBuffer.Enqueue(raisedEvent)
        ' Increment the message counter.
        msgCounter += 1
    Else
        ' Flush the buffer.
        Flush()
    End If

End Sub

Remarks

This is the method that ASP.NET health monitoring calls to start processing the event.

Applies to