WebEventProvider.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:
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
Tee yhteistyötä kanssamme GitHubissa
Tämän sisällön lähde on GitHubissa, jossa voit myös luoda ja tarkastella ongelmia ja pull-pyyntöjä. Katso lisätietoja osallistujan oppaasta.