WebAuthenticationFailureAuditEvent Конструкторы

Определение

Инициализирует новый экземпляр класса WebAuthenticationFailureAuditEvent.

Перегрузки

WebAuthenticationFailureAuditEvent(String, Object, Int32, String)

Инициализирует новый экземпляр класса WebAuthenticationFailureAuditEvent с указанными параметрами события.

WebAuthenticationFailureAuditEvent(String, Object, Int32, Int32, String)

Инициализирует новый экземпляр класса WebAuthenticationFailureAuditEvent с указанными параметрами события.

WebAuthenticationFailureAuditEvent(String, Object, Int32, String)

Инициализирует новый экземпляр класса WebAuthenticationFailureAuditEvent с указанными параметрами события.

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)

Параметры

message
String

Описание события.

eventSource
Object

Объект, являющийся источником события.

eventCode
Int32

Связанное с событием значение WebEventCodes.

nameToAuthenticate
String

Имя пользователя, который должен пройти проверку подлинности.

Примеры

В следующем примере кода показано, как настроить этот конструктор.

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

Комментарии

Конструктор WebAuthenticationFailureAuditEvent не предназначен для использования непосредственно из кода. Он называется ASP.NET. Конструктор можно вызвать WebAuthenticationFailureAuditEvent при наследоваве от WebAuthenticationFailureAuditEvent класса .

Применяется к

WebAuthenticationFailureAuditEvent(String, Object, Int32, Int32, String)

Инициализирует новый экземпляр класса WebAuthenticationFailureAuditEvent с указанными параметрами события.

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)

Параметры

message
String

Описание события.

eventSource
Object

Объект, являющийся источником события.

eventCode
Int32

Код, связанный с событием. При реализации пользовательского события код события должен превышать WebExtendedBase.

eventDetailCode
Int32

Значение WebEventCodes, указывающее подробный идентификатор для события.

nameToAuthenticate
String

Имя пользователя, который должен пройти проверку подлинности.

Примеры

В следующем примере кода показано, как настроить этот конструктор.

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

Комментарии

Конструктор WebAuthenticationFailureAuditEvent не предназначен для использования непосредственно из кода. Он называется ASP.NET. Конструктор можно вызвать WebAuthenticationFailureAuditEvent при наследоваве от WebAuthenticationFailureAuditEvent класса .

Применяется к