Condividi tramite


WebEventProvider Costruttore

Definizione

Inizializza una nuova istanza della classe WebEventProvider.

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

Esempio

Nell'esempio di codice seguente viene illustrato come usare questo costruttore in un provider di eventi personalizzato.

// 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.

Commenti

Il WebEventProvider costruttore non deve essere usato direttamente dal codice. Viene chiamato da ASP.NET. È possibile chiamare il WebEventProvider costruttore quando deriva dalla WebEventProvider classe.

Si applica a