語言

BufferedWebEventProvider 建構函式

定義

初始化 BufferedWebEventProvider 類別的新執行個體。

protected:
 BufferedWebEventProvider();
protected BufferedWebEventProvider();
Protected Sub New ()

範例

以下程式碼範例展示了如何在自訂事件提供者中使用此建構子。

public SampleBufferedWebEventProvider()
{
    // Perform local initializations.

    // Path of local file where to store 
    // event info.
    // Assure that the path works for you and
    // that the right permissions are set.
    logFilePath = "C:/test/log.doc";
    
    // Instantiate buffer to contain 
    // local data.
    customInfo = new StringBuilder();
}
Public Sub New()
   ' Perform local initializations.
   ' Path of local file where to store 
   ' event info.
   ' Assure that the path works for you and
   ' that the right permissions are set.
   logFilePath = "C:/test/log.doc"
   
   ' Instantiate buffer to contain 
   ' local data.
   customInfo = New StringBuilder()
End Sub

備註

此建構器由 ASP.NET 健康監控系統內部使用。 你永遠不會用它來實 TraceWebEventProvider 例化物件,但你可以在實作繼承自這個類別的提供者類型時呼叫這個建構子。

適用於