Share via


WebEventProvider Construtor

Definição

Inicializa uma nova instância da classe WebEventProvider.

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

Exemplos

O exemplo de código a seguir mostra como usar esse construtor em um provedor de eventos personalizado.

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

Comentários

O WebEventProvider construtor não se destina a ser usado diretamente do código. É chamado por ASP.NET. Você pode chamar o WebEventProvider construtor ao derivar da WebEventProvider classe.

Aplica-se a