WebBaseErrorEvent Construtores
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
Inicializa uma nova instância da WebBaseErrorEvent classe.
Sobrecargas
| Name | Description |
|---|---|
| WebBaseErrorEvent(String, Object, Int32, Exception) |
Inicializa uma nova instância da WebBaseErrorEvent classe. |
| WebBaseErrorEvent(String, Object, Int32, Int32, Exception) |
Inicializa uma nova instância da WebBaseErrorEvent classe. |
WebBaseErrorEvent(String, Object, Int32, Exception)
Inicializa uma nova instância da WebBaseErrorEvent classe.
protected public:
WebBaseErrorEvent(System::String ^ message, System::Object ^ eventSource, int eventCode, Exception ^ e);
protected internal WebBaseErrorEvent(string message, object eventSource, int eventCode, Exception e);
new System.Web.Management.WebBaseErrorEvent : string * obj * int * Exception -> System.Web.Management.WebBaseErrorEvent
Protected Friend Sub New (message As String, eventSource As Object, eventCode As Integer, e As Exception)
Parâmetros
- message
- String
A descrição do evento.
- eventSource
- Object
O objeto que é a fonte do evento.
- eventCode
- Int32
O código associado ao evento. Quando implementa um evento personalizado, o código do evento deve ser maior que WebExtendedBase.
Exemplos
O exemplo de código seguinte mostra como chamar este construtor a partir de um construtor para a SampleWebBaseErrorEvent classe, uma classe que deriva da WebBaseErrorEvent classe.
// Invoked in case of events identified only by their event code.
public SampleWebBaseErrorEvent(string msg,
object eventSource, int eventCode, Exception e):
base(msg, eventSource, eventCode, e)
{
// Perform custom initialization.
customCreatedMsg =
string.Format("Event created at: {0}",
DateTime.Now.TimeOfDay.ToString());
}
' Invoked in case of events identified only by their event code.
Public Sub New(ByVal msg As String, ByVal eventSource As Object, _
ByVal eventCode As Integer, ByVal e As Exception)
MyBase.New(msg, eventSource, eventCode, e)
' Perform custom initialization.
customCreatedMsg = String.Format("Event created at: {0}", _
DateTime.Now.TimeOfDay.ToString())
End Sub
Observações
Este construtor é utilizado internamente pelo sistema de monitorização de saúde ASP.NET. Pode chamar este construtor ao implementar o seu próprio tipo de evento que herda desta classe.
Ver também
Aplica-se a
WebBaseErrorEvent(String, Object, Int32, Int32, Exception)
Inicializa uma nova instância da WebBaseErrorEvent classe.
protected public:
WebBaseErrorEvent(System::String ^ message, System::Object ^ eventSource, int eventCode, int eventDetailCode, Exception ^ e);
protected internal WebBaseErrorEvent(string message, object eventSource, int eventCode, int eventDetailCode, Exception e);
new System.Web.Management.WebBaseErrorEvent : string * obj * int * int * Exception -> System.Web.Management.WebBaseErrorEvent
Protected Friend Sub New (message As String, eventSource As Object, eventCode As Integer, eventDetailCode As Integer, e As Exception)
Parâmetros
- message
- String
A descrição do evento.
- eventSource
- Object
O objeto que é a fonte do evento.
- eventCode
- Int32
O código associado ao evento. Quando implementa um evento personalizado, o código do evento deve ser maior que WebExtendedBase.
- eventDetailCode
- Int32
O identificador detalhado do evento.
Exemplos
O exemplo de código seguinte mostra como chamar este construtor a partir de um construtor para a SampleWebBaseErrorEvent classe, uma classe que deriva da WebBaseErrorEvent classe.
// Invoked in case of events identified by their event code and
// related event detailed code.
public SampleWebBaseErrorEvent(string msg, object eventSource,
int eventCode, int detailedCode, Exception e):
base(msg, eventSource, eventCode, detailedCode, e)
{
// Perform custom initialization.
customCreatedMsg =
string.Format("Event created at: {0}",
DateTime.Now.TimeOfDay.ToString());
}
' Invoked in case of events identified by their event code and
' related event detailed code.
Public Sub New(ByVal msg As String, ByVal eventSource As Object, _
ByVal eventCode As Integer, ByVal detailedCode As Integer, _
ByVal e As Exception)
MyBase.New(msg, eventSource, eventCode, detailedCode, e)
' Perform custom initialization.
customCreatedMsg = String.Format("Event created at: {0}", _
DateTime.Now.TimeOfDay.ToString())
End Sub
Observações
Este construtor é utilizado internamente pelo sistema de monitorização de saúde ASP.NET. Pode chamar este construtor ao implementar o seu próprio tipo de evento que herda desta classe.