Udostępnij za pośrednictwem


WebAuthenticationSuccessAuditEvent Konstruktory

Definicja

Inicjuje nowe wystąpienie klasy WebAuthenticationSuccessAuditEvent.

Przeciążenia

WebAuthenticationSuccessAuditEvent(String, Object, Int32, String)

Inicjuje klasę WebAuthenticationSuccessAuditEvent przy użyciu podanych parametrów.

WebAuthenticationSuccessAuditEvent(String, Object, Int32, Int32, String)

Inicjuje klasę WebSuccessAuditEvent przy użyciu podanych parametrów.

WebAuthenticationSuccessAuditEvent(String, Object, Int32, String)

Inicjuje klasę WebAuthenticationSuccessAuditEvent przy użyciu podanych parametrów.

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)

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.

nameToAuthenticate
String

Nazwa uwierzytelnionego użytkownika.

Przykłady

W poniższym przykładzie kodu pokazano, jak dostosować ten konstruktor.

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

Uwagi

Ten konstruktor jest używany wewnętrznie przez system monitorowania kondycji ASP.NET. Nigdy nie użyjesz go do utworzenia wystąpienia WebAuthenticationSuccessAuditEvent obiektu, ale możesz wywołać ten konstruktor podczas implementowania własnego typu zdarzenia dziedziczonego z tej klasy.

Uwaga

Konstruktor WebAuthenticationSuccessAuditEvent nie jest przeznaczony do użycia bezpośrednio z kodu. Jest wywoływana przez ASP.NET. Konstruktor można wywołać WebAuthenticationSuccessAuditEvent podczas wyprowadzania z WebAuthenticationSuccessAuditEvent klasy .

Dotyczy

WebAuthenticationSuccessAuditEvent(String, Object, Int32, Int32, String)

Inicjuje klasę WebSuccessAuditEvent przy użyciu podanych parametrów.

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)

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 uwierzytelnionego użytkownika.

Przykłady

W poniższym przykładzie kodu pokazano, jak dostosować ten konstruktor.

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

Uwagi

Ten konstruktor jest używany wewnętrznie przez system monitorowania kondycji ASP.NET. Nigdy nie użyjesz go do utworzenia wystąpienia WebAuthenticationSuccessAuditEvent obiektu, ale możesz wywołać ten konstruktor podczas implementowania własnego typu zdarzenia dziedziczonego z tej klasy.

Uwaga

Konstruktor WebAuthenticationSuccessAuditEvent nie jest przeznaczony do użycia bezpośrednio z kodu. Jest wywoływana przez ASP.NET. Konstruktor można wywołać WebAuthenticationSuccessAuditEvent podczas wyprowadzania z WebAuthenticationSuccessAuditEvent klasy .

Dotyczy