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 ,但在实现继承自此类的你自己的提供程序类型时,可以调用此构造函数。

适用于