WebEventBufferFlushInfo Clase

Definición

Contiene los parámetros que definen las características del búfer de vaciado.

public ref class WebEventBufferFlushInfo sealed
public sealed class WebEventBufferFlushInfo
type WebEventBufferFlushInfo = class
Public NotInheritable Class WebEventBufferFlushInfo
Herencia
WebEventBufferFlushInfo

Ejemplos

En el ejemplo de código siguiente se muestra cómo usar la WebEventBufferFlushInfo clase . Este ejemplo de código forma parte de un ejemplo más grande proporcionado para la BufferedWebEventProvider clase .


// Processes the messages that have been buffered.
// It is called by the ASP.NET when the flushing of 
// the buffer is required.
public override void ProcessEventFlush(
    WebEventBufferFlushInfo flushInfo)
{

    // Customize event information to be sent to 
    // the Windows Event Viewer Application Log.
    customInfo.AppendLine(
        "SampleEventLogWebEventProvider buffer flush.");

    customInfo.AppendLine(
        string.Format("NotificationType: {0}",
        GetNotificationType(flushInfo)));

    customInfo.AppendLine(
        string.Format("EventsInBuffer: {0}",
        GetEventsInBuffer(flushInfo)));

    customInfo.AppendLine(
        string.Format(
        "EventsDiscardedSinceLastNotification: {0}",
        GetEventsDiscardedSinceLastNotification(flushInfo)));

    // Read each buffered event and send it to the
    // Application Log.
    foreach (WebBaseEvent eventRaised in flushInfo.Events)
        customInfo.AppendLine(eventRaised.ToString());

    // Store the information in the specified file.
    StoreToFile(customInfo, logFilePath, FileMode.Append);
}
    ' Processes the messages that have been buffered.
    ' It is called by the ASP.NET when the flushing of 
    ' the buffer is required according to the parameters 
    ' defined in the <bufferModes> element of the 
    ' <healthMonitoring> configuration section.
    Public Overrides Sub ProcessEventFlush(ByVal flushInfo _
    As WebEventBufferFlushInfo)

        ' Customize event information to be sent to 
        ' the Windows Event Viewer Application Log.
        customInfo.AppendLine( _
        "SampleEventLogWebEventProvider buffer flush.")

        customInfo.AppendLine(String.Format( _
        "NotificationType: {0}", _
        GetNotificationType(flushInfo)))

        customInfo.AppendLine(String.Format( _
        "EventsInBuffer: {0}", _
        GetEventsInBuffer(flushInfo)))

        customInfo.AppendLine(String.Format( _
        "EventsDiscardedSinceLastNotification: {0}", _
GetEventsDiscardedSinceLastNotification( _
flushInfo)))

        ' Read each buffered event and send it to the
        ' Application Log.
        Dim eventRaised As WebBaseEvent
        For Each eventRaised In flushInfo.Events
            customInfo.AppendLine(eventRaised.ToString())
        Next eventRaised
        ' Store the information in the specified file.
        StoreToFile(customInfo, logFilePath, _
        FileMode.Append)
    End Sub

Comentarios

ASP.NET supervisión del estado permite al personal de producción y operaciones administrar aplicaciones web implementadas. El System.Web.Management espacio de nombres contiene los tipos de eventos de mantenimiento responsables de empaquetar los datos de estado de la aplicación y los tipos de proveedor responsables de procesar estos datos. También contiene tipos auxiliares que ayudan durante la administración de eventos de mantenimiento.

La WebEventBufferFlushInfo clase define valores que identifican el estado actual del búfer. Una instancia de la clase se pasa como parámetro al ProcessEventFlush método que procesa los mensajes almacenados en búfer. ASP.NET la supervisión del estado llama a este método cuando se requiere el vaciado del búfer. Esto viene determinado por los parámetros definidos por el bufferModes elemento de la healthMonitoring sección de configuración.

Note

Por diseño, el mecanismo de almacenamiento en búfer podría quitar algunos eventos para mantener el ritmo de los eventos entrantes. Es necesario que el usuario ajuste este mecanismo modificando correctamente el bufferModes elemento en la healthMonitoring sección de configuración.

Propiedades

Nombre Description
Events

Obtiene la colección de eventos en el mensaje actual.

EventsDiscardedSinceLastNotification

Obtiene el número de eventos eliminados desde la última notificación.

EventsInBuffer

Obtiene el número de eventos del búfer.

LastNotificationUtc

Obtiene la fecha y la hora de la última notificación.

NotificationSequence

Obtiene la secuencia de mensajes en la notificación actual.

NotificationType

Obtiene el tipo de notificación actual.

Métodos

Nombre Description
Equals(Object)

Determina si el objeto especificado es igual al objeto actual.

(Heredado de Object)
GetHashCode()

Actúa como función hash predeterminada.

(Heredado de Object)
GetType()

Obtiene el Type de la instancia actual.

(Heredado de Object)
MemberwiseClone()

Crea una copia superficial del Objectactual.

(Heredado de Object)
ToString()

Devuelve una cadena que representa el objeto actual.

(Heredado de Object)

Se aplica a

Consulte también