WebAuthenticationSuccessAuditEvent 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 WebAuthenticationSuccessAuditEvent classe.
Sobrecargas
| Name | Description |
|---|---|
| WebAuthenticationSuccessAuditEvent(String, Object, Int32, String) |
Inicializa a WebAuthenticationSuccessAuditEvent classe usando os parâmetros fornecidos. |
| WebAuthenticationSuccessAuditEvent(String, Object, Int32, Int32, String) |
Inicializa a WebSuccessAuditEvent classe usando os parâmetros fornecidos. |
WebAuthenticationSuccessAuditEvent(String, Object, Int32, String)
Inicializa a WebAuthenticationSuccessAuditEvent classe usando os parâmetros fornecidos.
protected public:
WebAuthenticationSuccessAuditEvent(System::String ^ message, System::Object ^ eventSource, int eventCode, System::String ^ nameToAuthenticate);
protected internal WebAuthenticationSuccessAuditEvent(string message, object eventSource, int eventCode, string nameToAuthenticate);
new System.Web.Management.WebAuthenticationSuccessAuditEvent : string * obj * int * string -> System.Web.Management.WebAuthenticationSuccessAuditEvent
Protected Friend Sub New (message As String, eventSource As Object, eventCode As Integer, nameToAuthenticate As String)
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.
- nameToAuthenticate
- String
O nome do utilizador autenticado.
Exemplos
O seguinte exemplo de código mostra como personalizar este construtor.
// Invoked in case of events identified only by their event code.
public SampleWebAuthenticationSuccessAuditEvent(
string msg, object eventSource,
int eventCode, string userName):
base(msg, eventSource, eventCode, userName)
{
// 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 userName As String)
MyBase.New(msg, eventSource, eventCode, userName)
' 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. Nunca o usará para instanciar um WebAuthenticationSuccessAuditEvent objeto, mas pode chamar este construtor ao implementar o seu próprio tipo de evento que herda desta classe.
Note
O WebAuthenticationSuccessAuditEvent construtor não foi concebido para ser usado diretamente a partir do seu código. É chamada por ASP.NET. Podes chamar o WebAuthenticationSuccessAuditEvent construtor ao derivar da WebAuthenticationSuccessAuditEvent classe.
Aplica-se a
WebAuthenticationSuccessAuditEvent(String, Object, Int32, Int32, String)
Inicializa a WebSuccessAuditEvent classe usando os parâmetros fornecidos.
protected public:
WebAuthenticationSuccessAuditEvent(System::String ^ message, System::Object ^ eventSource, int eventCode, int eventDetailCode, System::String ^ nameToAuthenticate);
protected internal WebAuthenticationSuccessAuditEvent(string message, object eventSource, int eventCode, int eventDetailCode, string nameToAuthenticate);
new System.Web.Management.WebAuthenticationSuccessAuditEvent : string * obj * int * int * string -> System.Web.Management.WebAuthenticationSuccessAuditEvent
Protected Friend Sub New (message As String, eventSource As Object, eventCode As Integer, eventDetailCode As Integer, nameToAuthenticate As String)
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 WebEventCodes valor que especifica o identificador detalhado do evento.
- nameToAuthenticate
- String
O nome do utilizador autenticado.
Exemplos
O seguinte exemplo de código mostra como personalizar este construtor.
// Invoked in case of events identified by their event code.and
// event detailed code.
public SampleWebAuthenticationSuccessAuditEvent(
string msg, object eventSource,
int eventCode, int detailedCode, string userName):
base(msg, eventSource, eventCode, detailedCode, userName)
{
// 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
' event detailed code.
Public Sub New(ByVal msg As String, _
ByVal eventSource As Object, _
ByVal eventCode As Integer, _
ByVal detailedCode As Integer, _
ByVal userName As String)
MyBase.New(msg, eventSource, eventCode, _
detailedCode, userName)
' 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. Nunca o usará para instanciar um WebAuthenticationSuccessAuditEvent objeto, mas pode chamar este construtor ao implementar o seu próprio tipo de evento que herda desta classe.
Note
O WebAuthenticationSuccessAuditEvent construtor não foi concebido para ser usado diretamente a partir do seu código. É chamada por ASP.NET. Podes chamar o WebAuthenticationSuccessAuditEvent construtor ao derivar da WebAuthenticationSuccessAuditEvent classe.