WebApplicationLifetimeEvent コンストラクター

定義

WebApplicationLifetimeEvent クラスの新しいインスタンスを初期化します。

オーバーロード

名前 説明
WebApplicationLifetimeEvent(String, Object, Int32)

指定されたパラメーターを使用して、 WebApplicationLifetimeEvent クラスを初期化します。

WebApplicationLifetimeEvent(String, Object, Int32, Int32)

指定されたパラメーターを使用して、 WebApplicationLifetimeEvent クラスを初期化します。

WebApplicationLifetimeEvent(String, Object, Int32)

指定されたパラメーターを使用して、 WebApplicationLifetimeEvent クラスを初期化します。

protected public:
 WebApplicationLifetimeEvent(System::String ^ message, System::Object ^ eventSource, int eventCode);
protected internal WebApplicationLifetimeEvent(string message, object eventSource, int eventCode);
new System.Web.Management.WebApplicationLifetimeEvent : string * obj * int -> System.Web.Management.WebApplicationLifetimeEvent
Protected Friend Sub New (message As String, eventSource As Object, eventCode As Integer)

パラメーター

message
String

イベントに関連付けられているメッセージ。

eventSource
Object

イベントのソースであるオブジェクト。

eventCode
Int32

イベントに関連付けられているコード。 カスタム イベントを実装する場合、イベント コードは WebExtendedBaseより大きい必要があります。

次のコード例は、ASP.NET カスタム正常性イベントで WebApplicationLifetimeEventを使用する方法を示しています。 このコード例は、主に使用する正しい構文を示すことを目的としています。

// Invoked in case of events identified only by 
// their event code.
public SampleWebApplicationLifetimeEvent(string msg, 
    object eventSource, int eventCode):
  base(msg, eventSource, eventCode)
{
    // 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)
    MyBase.New(msg, eventSource, eventCode)
    ' Perform custom initialization.
    customCreatedMsg = _
    String.Format("Event created at: {0}", _
    DateTime.Now.TimeOfDay.ToString())

End Sub

注釈

このコンストラクターは、ASP.NET の正常性監視システムによって内部的に使用されます。 このクラスを使用して WebApplicationLifetimeEvent クラスのインスタンスを作成することはありませんが、このクラスから継承する独自のイベント型を実装するときに、このコンストラクターを呼び出すことができます。

Note

WebApplicationLifetimeEvent コンストラクターは、コードから直接使用するためのものではありません。 ASP.NET によって呼び出されます。 WebApplicationLifetimeEvent クラスから派生するときに、WebApplicationLifetimeEvent コンストラクターを呼び出すことができます。

こちらもご覧ください

適用対象

WebApplicationLifetimeEvent(String, Object, Int32, Int32)

指定されたパラメーターを使用して、 WebApplicationLifetimeEvent クラスを初期化します。

protected public:
 WebApplicationLifetimeEvent(System::String ^ message, System::Object ^ eventSource, int eventCode, int eventDetailCode);
protected internal WebApplicationLifetimeEvent(string message, object eventSource, int eventCode, int eventDetailCode);
new System.Web.Management.WebApplicationLifetimeEvent : string * obj * int * int -> System.Web.Management.WebApplicationLifetimeEvent
Protected Friend Sub New (message As String, eventSource As Object, eventCode As Integer, eventDetailCode As Integer)

パラメーター

message
String

イベントに関連付けられているメッセージ。

eventSource
Object

イベントのソースであるオブジェクト。

eventCode
Int32

イベントに関連付けられているコード。 カスタム イベントを実装する場合、イベント コードは WebExtendedBaseより大きい必要があります。

eventDetailCode
Int32

イベントの詳細な識別子を指定する WebEventCodes 値。

次のコード例は、ASP.NET カスタム正常性イベントで WebApplicationLifetimeEventを使用する方法を示しています。 このコード例は、主に使用する正しい構文を示すことを目的としています。

// Invoked in case of events identified by their 
// event code.and related event detailed code.
public SampleWebApplicationLifetimeEvent(string msg, 
    object eventSource, int eventCode, 
    int eventDetailCode):
  base(msg, eventSource, eventCode, eventDetailCode)
{
    // 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 eventDetailCode As Integer)
    MyBase.New(msg, eventSource, _
    eventCode, eventDetailCode)
    ' Perform custom initialization.
    customCreatedMsg = _
    String.Format("Event created at: {0}", _
    DateTime.Now.TimeOfDay.ToString())
End Sub

注釈

このコンストラクターは、ASP.NET の正常性監視システムによって内部的に使用されます。 このクラスを使用して WebApplicationLifetimeEvent クラスのインスタンスを作成することはありませんが、このクラスから継承する独自のイベント型を実装するときに、このコンストラクターを呼び出すことができます。

Note

WebApplicationLifetimeEvent コンストラクターは、コードから直接使用するためのものではありません。 ASP.NET によって呼び出されます。 WebApplicationLifetimeEvent クラスから派生するときに、WebApplicationLifetimeEvent コンストラクターを呼び出すことができます。

こちらもご覧ください

適用対象