BufferedWebEventProvider.ProcessEventFlush(WebEventBufferFlushInfo) Yöntem
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
Arabelleğe alınan olayları işler.
public:
abstract void ProcessEventFlush(System::Web::Management::WebEventBufferFlushInfo ^ flushInfo);
public abstract void ProcessEventFlush (System.Web.Management.WebEventBufferFlushInfo flushInfo);
abstract member ProcessEventFlush : System.Web.Management.WebEventBufferFlushInfo -> unit
Public MustOverride Sub ProcessEventFlush (flushInfo As WebEventBufferFlushInfo)
Parametreler
- flushInfo
- WebEventBufferFlushInfo
WebEventBufferFlushInfo Arabelleğe alma bilgilerini içeren bir.
Örnekler
Aşağıdaki kod örneği, yönteminin nasıl uygulandığını ProcessEventFlush gösterir.
// 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
ProcessEventFlush yöntemi arabelleğe alınmış iletileri işler. ASP.NET durumu izleme, arabelleğin boşaltılması gerektiğinde yöntemini çağırır. Boşaltmanın gerekli olduğu aralıklar, yapılandırma bölümündeki öğesindeki healthMonitoring
özniteliğin providers
parametre değeri bufferMode
tarafından belirlenir.
Şunlara uygulanır
Geri Bildirim
https://aka.ms/ContentUserFeedback.
Çok yakında: 2024 boyunca, içerik için geri bildirim mekanizması olarak GitHub Sorunları’nı kullanımdan kaldıracak ve yeni bir geri bildirim sistemiyle değiştireceğiz. Daha fazla bilgi için bkz.Gönderin ve geri bildirimi görüntüleyin