共用方式為


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 物件,但您可以在實作繼承自這個類別的您自己的提供者類型時呼叫這個建構函式。

適用於