WebApplicationLifetimeEvent 생성자
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
WebApplicationLifetimeEvent 클래스의 새 인스턴스를 초기화합니다.
오버로드
| Name | Description |
|---|---|
| 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
이벤트와 연결된 코드입니다. 사용자 지정 이벤트를 구현할 때 이벤트 코드는 1보다 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 인스턴스를 만드는 데는 사용하지 않지만 이 클래스에서 상속되는 고유한 이벤트 형식을 구현할 때 이 생성자를 호출할 수 있습니다.
메모
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
이벤트와 연결된 코드입니다. 사용자 지정 이벤트를 구현할 때 이벤트 코드는 1보다 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 인스턴스를 만드는 데는 사용하지 않지만 이 클래스에서 상속되는 고유한 이벤트 형식을 구현할 때 이 생성자를 호출할 수 있습니다.
메모
WebApplicationLifetimeEvent 생성자는 코드에서 직접 사용할 수 없습니다. 그것은 ASP.NET 의해 호출됩니다. 클래스에서 파생할 WebApplicationLifetimeEvent 때 생성자를 호출할 WebApplicationLifetimeEvent 수 있습니다.