WebEventProvider.Flush メソッド
アセンブリ: System.Web (system.web.dll 内)


このメソッドが呼び出されると、バッファにあるすべてのイベントが、最後の書き込みからの経過時間やバッファに格納されているイベント数に関係なく、直ちにバッファからイベント ログに移動されます。最後の書き込みの時刻は、フラッシュ操作の時刻に設定し直されます。

' Flush the input buffer if required. Public Overrides Sub Flush() ' Create a string builder to ' hold the event information. Dim reData As New StringBuilder() ' Store custom information. reData.Append( _ "SampleEventProvider processing." + _ Environment.NewLine) reData.Append( _ "Flush done at: {0}" + _ DateTime.Now.TimeOfDay.ToString() + _ Environment.NewLine) Dim e As WebBaseEvent For Each e In msgBuffer ' Store event data. reData.Append(e.ToString()) Next e ' Store the information in the specified file. StoreToFile(reData, logFilePath, FileMode.Append) ' Reset the message counter. msgCounter = 0 ' Clear the buffer. msgBuffer.Clear() End Sub 'Flush
// Flush the input buffer if required. public override void Flush() { // Create a string builder to // hold the event information. StringBuilder reData = new StringBuilder(); // Store custom information. reData.Append("SampleEventProvider processing." + Environment.NewLine); reData.Append("Flush done at: {0}" + DateTime.Now.TimeOfDay.ToString() + Environment.NewLine); foreach (WebBaseEvent e in msgBuffer) { // Store event data. reData.Append(e.ToString()); } // Store the information in the specified file. StoreToFile(reData, logFilePath, FileMode.Append); // Reset the message counter. msgCounter = 0; // Clear the buffer. msgBuffer.Clear(); }

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からWebEventProvider.Flush メソッドを検索する場合は、下記のリンクをクリックしてください。

- WebEventProvider.Flush メソッドのページへのリンク