Condividi tramite


WebEventProvider.ProcessEvent(WebBaseEvent) Metodo

Definizione

Elabora l'evento passato al 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)

Parametri

raisedEvent
WebBaseEvent

Oggetto WebBaseEvent da elaborare.

Esempio

Nell'esempio di codice seguente viene illustrato come implementare il metodo ProcessEvent. Questo metodo aggiunge la rappresentazione di stringa personalizzata dell'evento a un file di log specifico.


// 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

Commenti

Si tratta del metodo che ASP.NET chiamate di monitoraggio dell'integrità per avviare l'elaborazione dell'evento.

Si applica a