Compartilhar via


BufferedWebEventProvider.ProcessEvent(WebBaseEvent) Método

Definição

Processa o evento passado para o provedor.

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

O objeto WebBaseEvent a ser processado.

Exemplos

O exemplo de código a seguir mostra como implementar o ProcessEvent método .


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

Comentários

Esse é o método que ASP.NET chamadas de monitoramento de integridade para iniciar o processamento do evento. Se o buffer estiver habilitado, as informações do evento serão armazenadas em buffer; caso contrário, ele será enviado para o mecanismo de registro em log atual.

Aplica-se a