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
التعاون معنا على GitHub
يمكن العثور على مصدر هذا المحتوى على GitHub حيث يمكنك أيضاً إضافة مشاكل وطلبات سحب ومراجعتها. للحصول على معلومات إضافية، اطلع على دليل المساهم لدينا.