WebEventBufferFlushInfo Sınıf

Tanım

Temizleme arabellek özelliklerini tanımlayan parametreleri içerir.

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

Örnekler

Aşağıdaki kod örneğinde sınıfının nasıl kullanılacağı gösterilmektedir WebEventBufferFlushInfo . Bu kod örneği, sınıfı için BufferedWebEventProvider sağlanan daha büyük bir örneğin parçasıdır.


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

Açıklamalar

ASP.NET sistem durumunu izleme, üretim ve operasyon personelinin dağıtılan Web uygulamalarını yönetmesine olanak tanır. Ad alanı, System.Web.Management uygulama sistem durumu verilerini paketlemeden sorumlu sistem durumu olay türlerini ve bu verileri işlemeden sorumlu sağlayıcı türlerini içerir. Ayrıca, sistem durumu olaylarının yönetimi sırasında yardımcı olan destekleyici türler içerir.

sınıfı, WebEventBufferFlushInfo arabelleğin geçerli durumunu tanımlayan değerleri tanımlar. Sınıfının bir örneği, arabelleğe alınmış iletileri işleyen yöntemine parametre ProcessEventFlush olarak geçirilir. ASP.NET sistem durumu izleme, arabellek boşaltma gerektiğinde bu yöntemi çağırır. Bu, yapılandırma bölümündeki öğesi bufferModes tarafından tanımlanan parametreler tarafından healthMonitoring belirlenir.

Note

Tasarım gereği arabelleğe alma mekanizması, gelen olaylara ayak uydurmak için bazı olayları bırakabilir. Yapılandırma bölümündeki öğeyi bufferModes düzgün bir şekilde değiştirerek bu mekanizmayı healthMonitoring ayarlamak kullanıcıya aittir.

Özellikler

Name Description
Events

Geçerli iletideki olay koleksiyonunu alır.

EventsDiscardedSinceLastNotification

Son bildirimden sonra bırakılan olay sayısını alır.

EventsInBuffer

Arabellekteki olay sayısını alır.

LastNotificationUtc

Son bildirimin tarihini ve saatini alır.

NotificationSequence

Geçerli bildirimde ileti sırasını alır.

NotificationType

Geçerli bildirim türünü alır.

Yöntemler

Name Description
Equals(Object)

Belirtilen nesnenin geçerli nesneye eşit olup olmadığını belirler.

(Devralındığı yer: Object)
GetHashCode()

Varsayılan karma işlevi işlevi görür.

(Devralındığı yer: Object)
GetType()

Geçerli örneğin Type alır.

(Devralındığı yer: Object)
MemberwiseClone()

Geçerli Objectbasit bir kopyasını oluşturur.

(Devralındığı yer: Object)
ToString()

Geçerli nesneyi temsil eden bir dize döndürür.

(Devralındığı yer: Object)

Şunlara uygulanır

Ayrıca bkz.