WebEventProvider Konstruktor

Definice

Inicializuje novou instanci WebEventProvider třídy.

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

Příklady

Následující příklad kódu ukazuje, jak použít tento konstruktor ve vlastním poskytovateli událostí.

// Initializes the provider.
public SampleEventProvider(): base()
{

    // Initialize the local path of the file 
    // that holds event information.
    logFilePath = "C:/test/log.doc";

    // Clear the message buffer.
    msgBuffer.Clear();

    // Initialize the max number of messages
    // to buffer.
    maxMsgNumber = 10;

    // More custom initialization goes here.
}
' Initializes the provider.
Public Sub New() 
    
    ' Initialize the local path of the file 
    ' that holds event information.
    logFilePath = "C:/test/log.doc"
    
    ' Clear the message buffer.
    msgBuffer.Clear()
    
    ' Initialize the max number of messages
    ' to buffer.
    maxMsgNumber = 10

End Sub
 
' More custom initialization goes here.

Poznámky

Konstruktor WebEventProvider není určen k použití přímo z kódu. Volá se ASP.NET. Při odvození z WebEventProvider třídy můžete volat WebEventProvider konstruktor.

Platí pro