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
Colaborar conosco no GitHub
A fonte deste conteúdo pode ser encontrada no GitHub, onde você também pode criar e revisar problemas e solicitações de pull. Para obter mais informações, confira o nosso guia para colaboradores.