BufferedWebEventProvider.ProcessEvent(WebBaseEvent) Método

Definición

Procesa el evento pasado al proveedor.

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)

Parámetros

eventRaised
WebBaseEvent

Objeto WebBaseEvent que se va a procesar.

Ejemplos

En el siguiente ejemplo de código se muestra cómo implementar el método 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

Comentarios

Este es el método que ASP.NET llamadas de supervisión de estado para iniciar el procesamiento del evento. Si el almacenamiento en búfer está habilitado, la información del evento se almacena en búfer; de lo contrario, se envía al mecanismo de registro actual.

Se aplica a