WebAuthenticationFailureAuditEvent Konstruktory
Definicja
Ważne
Niektóre informacje odnoszą się do produktu w wersji wstępnej, który może zostać znacząco zmodyfikowany przed wydaniem. Firma Microsoft nie udziela żadnych gwarancji, jawnych lub domniemanych, w odniesieniu do informacji podanych w tym miejscu.
Inicjuje nowe wystąpienie klasy WebAuthenticationFailureAuditEvent.
Przeciążenia
WebAuthenticationFailureAuditEvent(String, Object, Int32, String) |
Inicjuje WebAuthenticationFailureAuditEvent nowe wystąpienie klasy z określonymi parametrami zdarzenia. |
WebAuthenticationFailureAuditEvent(String, Object, Int32, Int32, String) |
Inicjuje WebAuthenticationFailureAuditEvent nowe wystąpienie klasy z określonymi parametrami zdarzenia. |
WebAuthenticationFailureAuditEvent(String, Object, Int32, String)
Inicjuje WebAuthenticationFailureAuditEvent nowe wystąpienie klasy z określonymi parametrami zdarzenia.
protected public:
WebAuthenticationFailureAuditEvent(System::String ^ message, System::Object ^ eventSource, int eventCode, System::String ^ nameToAuthenticate);
protected internal WebAuthenticationFailureAuditEvent(string message, object eventSource, int eventCode, string nameToAuthenticate);
new System.Web.Management.WebAuthenticationFailureAuditEvent : string * obj * int * string -> System.Web.Management.WebAuthenticationFailureAuditEvent
Protected Friend Sub New (message As String, eventSource As Object, eventCode As Integer, nameToAuthenticate As String)
Parametry
- message
- String
Opis zdarzenia.
- eventSource
- Object
Obiekt, który jest źródłem zdarzenia.
- eventCode
- Int32
Wartość WebEventCodes skojarzona ze zdarzeniem.
- nameToAuthenticate
- String
Nazwa użytkownika do uwierzytelnienia.
Przykłady
Poniższy przykład kodu przedstawia sposób dostosowywania tego konstruktora.
// Invoked in case of events identified only by
// their event code.
public SampleWebAuthenticationFailureAuditEvent(
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
Uwagi
Konstruktor WebAuthenticationFailureAuditEvent nie jest przeznaczony do użycia bezpośrednio z kodu. Jest wywoływana przez ASP.NET. Konstruktor można wywołać WebAuthenticationFailureAuditEvent podczas wyprowadzania z WebAuthenticationFailureAuditEvent klasy .
Dotyczy
WebAuthenticationFailureAuditEvent(String, Object, Int32, Int32, String)
Inicjuje WebAuthenticationFailureAuditEvent nowe wystąpienie klasy z określonymi parametrami zdarzenia.
protected public:
WebAuthenticationFailureAuditEvent(System::String ^ message, System::Object ^ eventSource, int eventCode, int eventDetailCode, System::String ^ nameToAuthenticate);
protected internal WebAuthenticationFailureAuditEvent(string message, object eventSource, int eventCode, int eventDetailCode, string nameToAuthenticate);
new System.Web.Management.WebAuthenticationFailureAuditEvent : string * obj * int * int * string -> System.Web.Management.WebAuthenticationFailureAuditEvent
Protected Friend Sub New (message As String, eventSource As Object, eventCode As Integer, eventDetailCode As Integer, nameToAuthenticate As String)
Parametry
- message
- String
Opis zdarzenia.
- eventSource
- Object
Obiekt, który jest źródłem zdarzenia.
- eventCode
- Int32
Kod skojarzony ze zdarzeniem. Podczas implementowania zdarzenia niestandardowego kod zdarzenia musi być większy niż WebExtendedBase.
- eventDetailCode
- Int32
Wartość WebEventCodes określająca szczegółowy identyfikator zdarzenia.
- nameToAuthenticate
- String
Nazwa użytkownika do uwierzytelnienia.
Przykłady
Poniższy przykład kodu przedstawia sposób dostosowywania tego konstruktora.
// Invoked in case of events identified by their event code.and
// event detailed code.
public SampleWebAuthenticationFailureAuditEvent(
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
Uwagi
Konstruktor WebAuthenticationFailureAuditEvent nie jest przeznaczony do użycia bezpośrednio z kodu. Jest wywoływana przez ASP.NET. Konstruktor można wywołać WebAuthenticationFailureAuditEvent podczas wyprowadzania z WebAuthenticationFailureAuditEvent klasy .