Partager via


BufferedWebEventProvider.ProcessEvent(WebBaseEvent) Méthode

Définition

Traite l'événement passé au fournisseur.

public:
 override void ProcessEvent(System::Web::Management::WebBaseEvent ^ eventRaised);
public override void ProcessEvent (System.Web.Management.WebBaseEvent eventRaised);
override this.ProcessEvent : System.Web.Management.WebBaseEvent -> unit
Public Overrides Sub ProcessEvent (eventRaised As WebBaseEvent)

Paramètres

eventRaised
WebBaseEvent

L'objet WebBaseEvent à traiter.

Exemples

L'exemple de code suivant illustre l'implémentation de la méthode ProcessEvent.


// Processes the incoming events.
// This method performs custom processing and, 
// if buffering is enabled, it calls the 
// base.ProcessEvent to buffer the event
// information.
public override void ProcessEvent(
    WebBaseEvent eventRaised)
{

    if (UseBuffering)
    {
        // Buffering enabled, call the 
        // base event to buffer event information.
        base.ProcessEvent(eventRaised);
    }
    else
    {
        // Buffering disabled, store the 
        // current event now.
        customInfo.AppendLine(
            "*** Buffering disabled ***");
        customInfo.AppendLine(
            eventRaised.ToString());
        // Store the information in the specified file.
        StoreToFile(customInfo, 
            logFilePath, FileMode.Append);
    }
}
' Processes the incoming events.
 ' This method performs custom 
 ' processing and, if buffering is 
 ' enabled, it calls the base.ProcessEvent
 ' to buffer the event information.
 Public Overrides Sub ProcessEvent( _
 ByVal eventRaised As WebBaseEvent)

     If UseBuffering Then
         ' Buffering enabled, call the base event to
         ' buffer event information.
         MyBase.ProcessEvent(eventRaised)
     Else
         ' Buffering disabled, store the current event
         ' now.
         customInfo.AppendLine("*** Buffering disabled ***")
         customInfo.AppendLine(eventRaised.ToString())
         ' Store the information in the specified file.
         StoreToFile(customInfo, _
         logFilePath, FileMode.Append)
     End If
 End Sub

Remarques

Il s’agit de la méthode qui ASP.NET appels de surveillance de l’intégrité pour démarrer le traitement de l’événement. Si la mise en mémoire tampon est activée, les informations d’événement sont mises en mémoire tampon ; sinon, il est distribué au mécanisme de journalisation actuel.

S’applique à